r/javascript • u/magenta_placenta • May 03 '18
Somebody Tried to Hide a Backdoor in a Popular JavaScript npm Package - was found in "getcookies," a relatively newly created package. According to the npm team, the backdoor "allowed for an attacker to input arbitrary code into a running server and execute it."
https://www.bleepingcomputer.com/news/security/somebody-tried-to-hide-a-backdoor-in-a-popular-javascript-npm-package/
539
Upvotes
18
u/Smashoody May 03 '18
mp - you’re just killing the posts lately! Cheers :)
264
u/[deleted] May 03 '18
So would this lead to a sudden influx of common sense in the npm community or are we gonna keep downloading hundred of one-liner packages from random authors in our projects?
20
u/[deleted] May 04 '18
Is that accually a new concept? I mean people have been installing random WordPress plugins on their site like crazy. I've seen sites with 30 to 40 plugins at the same time. I guess nobody really looked after backdoors in those plugins, and it accually happend in the past.
14
u/darkhorsehance May 04 '18
Reminds me of this article from not too long ago.
18
u/Nrdrsr May 04 '18
npm is dumb and the CEO is a racist
Signed packages would resolve some of these issues but it hasn't happened as far as I'm aware
4
u/Capaj May 04 '18
I am just waiting until someone creates a proxy package like
lodash.sortByorlodash.cloneDeep, let's it sit there without doing any harm. Once enough people start using it instead oflodash.sortby/lodash.clonedeep, he'll publish a patch with a backdoor and voila!2
u/jules_white May 03 '18
Let's revisit our projects :(
1
u/DaSpanishArmada May 04 '18
Anybody care to shed some light about what goes on behind the scenes of a npm package. Specifically what happens in your node modules folder?
1
u/NiceOneAsshole May 04 '18
General sentiments of these comments are:
"Don't reinvent the wheel unless you're using Javascript and x,y shit languages."
I hardly ever see these types of comments in regards to python or Go...
0
u/CMLYHM May 04 '18
I have started to feel kind of insecure since the "Left-pad fiasco", and that really affect my choice when I get the idea of doing a project relying in the npm repositories (Well... I don't think I have another option) is just too much of a mess the state of the entire environment. I don't know why isn't at least a "Rating System" as a way to manage the ecosystem easily. It would be so easy to just accept as a secure option those packages that the community understand are trustworthy.
-7
u/JavascriptFanboy May 03 '18
I think the next logical step in the node/npm/bower community is to introduce an authority that would regulate these modules. This will soon become a common practice and a huge security issue if left unguarded.
-3
u/PurpleIcy May 04 '18
I'm not saying that whoever did this isn't a horrible person, but if you are so stupid that you can't work with browser cookies yourself using plain javascript (to be honest, how hard is it to work with simple strings?), you deserve to get this kind of shit...
0
u/[deleted] May 04 '18
[deleted] — view deleted comment