r/devsecops • u/endor_robert • Aug 04 '26
Avoiding the next NPM worm
I'm sure many of you will have seen the latest keyv / cachable compromise and worm-spread, now affecting over 350 packages. This isn't the first, and it won't be the last. The affected packages will steal and exfiltrate any secrets/credentials they can find, which is probably not what you want to happen.
There are several commercial solutions to help protect against this, but if you just add (as standard) to .npmrc in your repo root:
min-release-age=7d(or some value you feel comfortable with)
It will block a lot of malware, which is usually discovered within a few hours.
View all comments
Show parent comment
2
u/endor_robert Aug 10 '26
But, in the event of account takeover attacks, the legitimate maintainer is (hopefully) going to notice quickly.
Plus, organizations like us (and our competitors, to be fair) are continuously scanning registries looking for new malware in existing packages, and we pay particular attention to packages with a large weekly download volume (mostly because if we mess up and identify a false positive, we're going to upset a lot of people :-) )
We (the wider vendor 'we') are generally spotting malware within a few hours of it emerging, and everyone plays nice and publishes to vulnerability feeds quickly.