r/programming • • Nov 27 '18

event-stream vulnerability explained

https://schneid.io/blog/event-stream-vulnerability-explained/
147 Upvotes

21 comments sorted by

View all comments

15

u/Vakz Nov 28 '18

Really is a very creative attack. Still, my understanding is that at the very core, it's still a case of social engineering. The attacker couldn't have done this if he hadn't been given full access to the git repo. I've seen a lot of people blaming NPM for this, but surely this attack would've been possible in any environment which uses package management, be it NPM, Nuget, Maven, pip or any other. The only exception I can see here is that it's harder to detect here, due to the custom of minifying, as my understanding from this summary is that the malicious code was only present in the minified version.

4

u/double-you Nov 28 '18

Yes, the main thing was getting permissions to change an established module. NPM's implementation helped hide it. I don't know how much extra processing power it would need from NPM, but the packages should really be minified from the public source by them and not the maintainer, or separate minification matching checks should be performed.

3

u/blargh10 Nov 28 '18

I was surprised to find they weren't already doing this.

The so called benefit of open-source is that "it's secure" because you have a lot of eyes looking at it is lost entirely.

If you publish a minified version you didn't process from source yourself will increase the risk factor exponentially.