Top
Best
New

Posted by cimi_ 9 hours ago

Keyv and friends compromised in active Shai-Hulud supply chain attack(www.aikido.dev)
201 points | 104 commentspage 2
thinkingemoji 5 hours ago||
No way to prevent this says only package manager where this regularly happens
insanitybit 4 hours ago||
This is the most boring comment posted on every one of these. NPM is by no means the worst offender here and offers a ton of solutions to this, lots of package managers are behind it or equivalent.

NPM gets targeted a lot because it's popular. That's it.

acdha 4 hours ago|||
It’s correct that NPM is not unique but it is the worst for cultural reasons: no other ecosystem started with such a limited language, which lead to the culture of publishing tons of small packages working around things which everything else had builtin. A Python project which has a hundred dependencies is considered quite large but the median React project had north of 30 thousand for years and years.
insanitybit 3 hours ago||
I think that's barely meaningful. Which of the compromised packages would have been part of any reasonable stdlib?
acdha 2 hours ago||
It’s not that there’s a single stdlib feature which would’ve stopped this but more that JavaScript developers have been conditioned that it’s normal to install tons of packages and update them quite frequently so there are a lot of individual maintainers who if compromised have a surprising impact.

You’re exposed as a function of the number of dependencies so the communities which most normalize many rapidly updating packages are going to be at greater risk. That’s not a simple trade off — that enterprise Java app which updates on a decadal cadence is still worse — but it means you need to accept the risk and use other mitigations.

insanitybit 1 hour ago||
I just don't think that this is that unique to javascript, it's absolutely not about npm, and I don't think that this is well supported as a relevant feature that leads to these attacks.
altcognito 4 hours ago||||
> NPM is by no means the worst offender here

Ok, I can agree it is a boring comment, but who is worse?

NPM gets targeted both because it is popular and because there is a wider attack surface (lots of little packages promoted by a huge variety of users) I have a high schooler who published work a couple weeks ago. This is good, but it comes with downsides. Maybe a couple more speed bumps or classifiers would be helpful. Maybe a consolidation of under maintained projects and deprecation is in order.

insanitybit 4 hours ago||
Arguably crates.io is worse. NPM has cooldowns and has for a while, it has had Trusted Publishing for longer, it has human-approved releases that separate CI/CD from actual publishing. Ruby is probably worse in every way.
woodruffw 3 hours ago||
RubyGems actually adopted Trusted Publishing before both npm and crates.io. To my recollection, they were second after PyPI.

(I have no opinion about the overall security posture of these indices.)

insanitybit 3 hours ago||
No build script control though.
woodruffw 3 hours ago||
Yep. That remains the norm with Python source distributions as well. It’s a hard thing to overcome when it’s baked deeply into packaging assumptions.
insanitybit 2 hours ago||
Yeah, my point is just that other package managers aren't in a great spot. NPM even lets you separate out "publish" and "release" now where you can publish to the registry but you have to separately "ack" that to release. That's kinda a huge win if people use it.

I just think the framing that npm is so bad is really flatly invalid.

altcognito 1 hour ago|||
> the framing that npm is so bad is really flatly invalid.

Is it really though if we're getting thousands of compromised packages regularly?

You can do all the right things and still be legit problematic.

insanitybit 1 hour ago||
Yes, it has nothing to do with the design of npm (relative to similar languages/ repositories) and everything to do with the popularity.
woodruffw 1 hour ago|||
I don’t think npm itself is measurably bad in ways that are useful to index on. Like others, I think that JS as an ecosystem has a culture that encourages both dependency sprawl and living at the edge, both of which contribute to the end problem of OSS malware.

(Rust has a similar culture, to be clear. I don’t think it’s a death knell.)

walrus01 4 hours ago||||
Other than what happened with 'xz', which was upstream of it getting packaged, how many times has this happened in the debian packages system? Also very popular.
insanitybit 4 hours ago||
I don't consider these comparable in any way that's worthwhile. The scale and goals are completely different.
walrus01 4 hours ago||
How are they not comparable?
insanitybit 3 hours ago||
Debian's scale for package distribution is tiny and explicitly curated by maintainers. Everything funnels through Debian. The goals are completely different. Debian packages what's necessary for an OS, npm packages everything needed for any projects arbitrarily. Auditing scales to one of those, not the other.
walrus01 3 hours ago||
The quantity of packages that exist at 162150 seems to say to me that there's a great many more than what are "necessary" for the operating system to exist.

sudo apt-cache stats

Total package names: 162150 (5189 k) Total package structures: 145852 (6417 k) Normal packages: 69505 Pure virtual packages: 1169 Single virtual packages: 64848 Mixed virtual packages: 355 Missing: 9975 Total distinct source versions: 71172 (1708 k) Total distinct versions: 71172 (6334 k) Total distinct descriptions: 139719 (3353 k) Total dependencies: 435057/121405 (10.6 M) Total ver/file relations: 73378 (1174 k) Total Desc/File relations: 142692 (2283 k) Total Provides mappings: 70533 (1693 k) Total globbed strings: 268430 (6560 k) Total slack space: 77.3 k Total space accounted for: 47.0 M Total buckets in PkgHashTable: 196613 Unused: 93545 Used: 103068 Utilization: 52.4218% Average entries: 1.4151 Longest: 19 Shortest: 1 Total buckets in GrpHashTable: 196613 Unused: 86025 Used: 110588 Utilization: 56.2465% Average entries: 1.46625 Longest: 7 Shortest: 1

insanitybit 3 hours ago||
162k vs millions. That's not even getting into package update velocity, authorship, the totally divergent goals, etc. I just think it's utterly pointless to compare.
lurkerforawhile 2 hours ago||||
left-pad was over a decade ago. it's a problem with the registry itself, more than just the package manager.
insanitybit 1 hour ago||
left-pad is totally irrelevant to this conversation.
rvz 4 hours ago|||
No other package manager is worse than NPM. Outside of its 'popularity', there are several fundamental reasons why this continues to happen to NPM:

- Imported packages are not pinned by default.

- Typescript / Javascript's lack of a standard library encourages the developer to import more packages into their codebase to address the short-comings which increases the risk of importing a bad package.

- Post install scripts execute external code by default upon downloading dependencies.

All of this comes by default in the ecosystem and we continue to see more shai-hulud worms all easily targeting NPM. Not even signed packages are enforced by default either.

fr3dx 3 hours ago|||
> Imported packages are not pinned by default

What do you mean? The lockfile of all package managers is there for pinning the exact versions. For yarn and pnpm, installs on CI run automatically from lockfile only, for npm I think you still need to run `npm ci` instead of `npm install`. But this guarantees that no new versions get pulled automatically in by CI.

> Typescript / Javascript's lack of a standard library

That's true, but it's not an issue of the package manager / registry

> Post install scripts execute external code by default upon downloading dependencies.

They are disabled by default in all package managers now, the user needs to manually allow them

madeofpalk 3 hours ago||||
Two out of three of your points - the first and last - are just incorrect.
insanitybit 4 hours ago|||
Ruby is worse. crates.io is arguably worse.
jesse_dot_id 3 hours ago||
echo "min-release-age=5" >> ~/.npmrc
Catloafdev 5 hours ago||
I mean what are these devs doing that they are day-1 updating npm packages still?

How many instances of this are required before npm package maintainers learn?

nubg 2 hours ago||
ad slop post
varunsharma07 3 hours ago||
We (StepSecurity) published a full analysis of both payload stages: https://www.stepsecurity.io/blog/chaindrop-npm-worm

Some additional detail from our analysis:

1. Provenance did not fail, it worked as designed and still shipped malware. The initial 11 packages were published through npm OIDC Trusted Publishing with valid SLSA attestations. The attacker compromised the maintainer's GitHub account and let the projects' own release workflows publish. Provenance proves which commit was built, not that the commit was authorized.

2. There is a booby trap on remediation: the worm installs a watcher that fires an attacker payload when the stolen GitHub token gets revoked. Remove the token monitor first, then rotate.

3. Persistence goes beyond node_modules. It writes .claude/settings.json (SessionStart hook) and .vscode/tasks.json (runOn: folderOpen), each re-executing the dropper. Check repo dotfiles too.

4. No C2 domain to sinkhole: exfil endpoints resolve at runtime from an Ethereum contract. Observed domain is npm-cache.com, but the operator can rotate it and push new code to infected hosts.

If you're auditing: look for setup.mjs, a 727,680 byte Math_Symbol.js (math_init.js in the second wave), and "preinstall": "node setup.mjs" in package.json. Careful, regenerate-unicode-properties ships a legitimate 1 KB Math_Symbol.js; the malicious one is over 700 KB.

Full IOC and package list in the post, updated as the campaign develops.

nubg 2 hours ago|
ai slop comment. post the original prompt
daniel_mcsoft 5 hours ago||
The cheapest mitigation almost nobody deploys: a version cooldown. These worms get caught fast — this one was flagged same-day, and the article's own timeline shows detection racing ahead of spread. If your CI simply refuses to adopt any version published in the last N days (Renovate supports this natively via minimumReleaseAge), you convert "worm spreads through the ecosystem in hours" into "worm must survive N days of public scrutiny before it can reach you." You give up almost nothing: how often does your product genuinely need a dependency version that's 48 hours old?

Combine that with the workflow split insanitybit describes — build/test jobs holding zero publish credentials, a separate publish job that only touches a finished artifact — and the wormable path is mostly closed without waiting for npm to redesign itself.

None of this is "sufficient" in rcxdude's sense, and that's fine. Sufficiency isn't the bar during an active outbreak; raising the attacker's cost per hop is.

freakynit 2 hours ago|
First point.. plus, OTP/MFA authenticated publishing.

This OTP/MFA should come from package repositories, before the package is made publicly available. This is needed so that CD stage is not blocked.

OTP/MFA should be scoped to publishing user/org, not the package. How the OTP/MFA client is managed across the maintainers/org, lies in the scope of maintainers/org.

pixl97 1 hour ago||
This still does nothing to prevent anyone from publishing a bad package, for example a compromised device/dev in the organization.

A cooldown of a day, and maybe not updating on weekends will save you from that.

It's time to stop moving at the speed of stupid.

khanhnguyen8386 2 hours ago||
[flagged]
cute_boi 6 hours ago||
I think npm can use chatgpt/claude for each published package to detect these types of attack? And if it sees they can restrict the package from making any changes.
wolfi1 5 hours ago|
the remedy is worse than the disease
ftlps 7 hours ago||
aikido.dev: SAST, AI code analysis and therefore a website that uses 100% CPU and prevents scrolling.

To the point of the article: I don't know why GitHub still allows the release feature. It is complete insanity. Tar archives must be constructed manually and checked for leaked keys etc.

tgv 6 hours ago|
I got the news via https://safedep.io/keyv-npm-supply-chain-compromise/
bijowo1676 4 hours ago|
I have a suspicion that a lot of these supply chain compromises are done by the security researchers at security vendors, selling software to protect the software supply chain. Spreading fear to create demand for their products.

Like in the good ole days of Windows 98 and antivirus era, a lot of advanced virus techniques in the wild came from the people who used to work for AV companies

woodruffw 3 hours ago|
That would be extremely surprising, given the number and severity of federal crimes involved.

(I also dare say: many of these attackers demonstrate a better in-depth understanding of packaging ecosystems than supply chain security vendors do.)

bijowo1676 2 hours ago||
the federal crimes part is irrelevant if its below the threshold of federal authorities actually cracking down on them and figuring out entire chain.

just because credit card theft and other types of scam are illegal

I remember how ddos attackers created "DDOS protection" companies to protect their victims against DDOS.

woodruffw 1 hour ago||
I don’t think the impact of these recent malware campaigns is below the threshold for federal interest.