News for hackers. Stuff that matters.
Re:You too can run malware from NPM (I mean without conseque... by sesm on Tuesday September 09, 2025 @07:46AM (#45180623)
I think malware check should be opt-on for package authors, but provide some kind of 'verified' badge to the package.
Re:You too can run malware from NPM (I mean without conseque... by naugtur on Tuesday September 09, 2025 @07:58AM (#45180729)
npm is on life support by msft. But there's socket.dev that can tell you if a package is malicious within hours of it being published.
Re:You too can run malware from NPM (I mean without conseque... by shreddit on Tuesday September 09, 2025 @08:08AM (#45180813)
“within hours” is at least one hour too late, and most likely multiple hours.
Re:You too can run malware from NPM (I mean without conseque... by naugtur on Tuesday September 09, 2025 @08:31AM (#45181058)
Absolutely not. you get npm packages by pulling not them pushing them to you as soon as a new version exist. The likelyhood of you updating instantly is close to zero and if not, you should set your stuff up so that it is. Many ways to do that. Even better if compared to a month or two - which is how long it often takes for a researcher to find a carefully planted malware.

Anyway, the case where reactive tools (detections, warnings) don't catch it is why LavaMoat exists. It prevents whole classes of malware from working at runtime. The article (and repo) demonstrates that.

Re:You too can run malware from NPM (I mean without conseque... by rs186 on Tuesday September 09, 2025 @09:29AM (#45181656)
Sure, it should never happen in CI environment. But I bet that every second, someone in the world is running "npm install" to bring in a new dependency to a new/existing project, and the impact of a malicious release can be broad very quickly. Vibe coding is not going to slow this down.
Re:You too can run malware from NPM (I mean without conseque... by naugtur on Tuesday September 09, 2025 @09:58AM (#45182000)
Vibe coding brings up the need for even more granular isolation. I'm on it ;)

LavaMoat Webpack Plugin will soom have the ability to treat parts of your app same as it currently treats packages - with isolation and policy limiting what they can do.

Re:You too can run malware from NPM (I mean without conseque... by bavarianbob on Tuesday September 09, 2025 @10:34AM (#45182510)
I've worked in software supply chain security for two years now and this is an extremely optimistic take. Nearly all organizations are not even remotely close to this level of responsiveness.
Re:You too can run malware from NPM (I mean without conseque... by naugtur on Monday September 15, 2025 @02:05PM (#45252966)
Again, that's why LavaMoat exists. Set it up once and it will block many classes of attacks regardless of where they come from.
Re:You too can run malware from NPM (I mean without conseque... by Cthulhu_ on Tuesday September 09, 2025 @10:11AM (#45182212)
Depends on whether they hold publishing to the main audience until said scan has finished.
Re:You too can run malware from NPM (I mean without conseque... by Cthulhu_ on Tuesday September 09, 2025 @10:13AM (#45182229)
I always thought this would be the ideal monetization path for NPM; enterprises pay them, NPM only supplies verified package releases, ideally delayed by hours/days after release so that anything that slips through the cracks has a chance to get caught.
Re:You too can run malware from NPM (I mean without conseque... by chrisweekly on Tuesday September 09, 2025 @10:21AM (#45182318)
Enterprises today typically use a custom registry, which can include any desired amount of scans and rigorous controls.
Re:You too can run malware from NPM (I mean without conseque... by johannes1234321 on Tuesday September 09, 2025 @02:09PM (#45185964)
That would put them into liability or be a quite worthless agreement taking no responsibility.
Re:You too can run malware from NPM (I mean without conseque... by yjftsjthsd-h on Tuesday September 09, 2025 @10:34AM (#45182513)
> but provide some kind of 'verified' badge to the package

I would worry that that results in a false sense of security. Even if the actual badge says "passes some heuristics that catch only the most obvious malicious code", many people will read "totally 100% safe, please use with reckless abandon".

Re:You too can run malware from NPM (I mean without conseque... by madeofpalk on Tuesday September 09, 2025 @12:16PM (#45184181)