Hacker News new | ask | show | jobs
by jacquesm 3980 days ago
Isn't that server side?
3 comments

Yes, but the same attack could happen if an attacker gains control of an npm module. Users without tight control over their modules could unwittingly pull in malicious code.
With dependency resolution and node_modules folders dozens of levels deep, it's pretty difficult to verify untrusted code hasn't been injected somewhere.
Not really. NPM is also used with a tool called browserify to enable frontend web developers to use NPM modules in the browser.