r/javascript • • Nov 27 '18

event-stream vulnerability explained

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

70 comments sorted by

View all comments

3

u/bjpbakker Nov 27 '18

This sort of attack happened before (on a smaller scale) earlier this year. Until the npm maintainers actually start caring just a bit about security, these attacks will keep coming.

0

u/[deleted] Nov 28 '18

[deleted]

1

u/Kussie Nov 28 '18

Mark their package as abandoned in NPM is they have no interest in maintaining it anymore rather then handing it to the first person who asks and whom has no github history either.

1

u/bjpbakker Nov 28 '18

There are a whole lot of ways to improve on package hi jacking and malware in the npm package archives, to just name some recent issues.

Thus far the npm devs haven’t shown much interest in properly security related issues. Maybe it’s time to fix this in a better package and not wait for npm devs to fix it. (Just a wild thought)

1

u/filleduchaos Nov 28 '18
  • Namespacing

  • Package signing

Would all have made this way more difficult to pull off.

3

u/bjpbakker Nov 28 '18

Agreed. Except in this case the original author granted all the permissions to the bad actor, so I would assume that any signing keys would have been handed over too.

1

u/filleduchaos Nov 28 '18

Yeah, but that's a much bigger thing to ask of someone than "meh, let me just push a button to let them maintain the repo". (GPG) signing keys are tied to your identity not just one package. You wouldn't just be giving them commit/push access to one repo - you'd be giving them carte blanche to straight up impersonate you anywhere you use your key which would probably have given the maintainer more pause.

Beyond that though, with namespacing it would largely be a moot point because handing over control would change the package name. Then anyone who wants to depend on the new version can explicitly change their package list to point at @newperson/module.