News for hackers. Stuff that matters.
Re:NPM debug and chalk packages compromised by NoahZuniga on Monday September 08, 2025 @02:18PM (#45171848)
One thing I've been thinking of is to restrict global access to packages. Something like ansi-styles doesn't need access to the crypto global, or to the DOM, or make web requests, etc. So if you can sandbox individual libraries, you can decrease the attack surface a lot.

You could imagine that a compromised pad-left package could read the contents of all password inputs on the page and send it to an attacker server, but if you don't let that package access the document, or send web requests, you can avoid this compromise.

There are no comments on this comment yet.