logoalt Hacker News

Post Mortem: axios NPM supply chain compromise

95 pointsby Kyro38today at 12:00 AM58 commentsview on HN

Comments

evikstoday at 10:15 AM

> something on my system was out of date. i installed the missing item

Given the "extreme vigilance" of the primitive "don't install unknown something on your machine" level is unattainable, can there really be an effective project-level solutions?

Mandatory involvement of more people to hope not everyone installs random stuff, at least not at same time? (though you might not even have more people...)

Zopieuxtoday at 2:09 AM

Not much we didn't know (you're basically SOL since an owner was compromised), however we now have a small peek into the actual meat of the social engineering, which is the only interesting news imho: https://github.com/axios/axios/issues/10636#issuecomment-418...

show 2 replies
robshipprtoday at 3:09 AM

The interesting detail from this thread is that every legitimate v1 release had OIDC provenance attestations and the malicious one didn't, but nobody checks. Even simpler, if you're diffing your lockfile between deploys, a brand new dependency appearing in a patch release is a pretty obvious red flag.

show 2 replies
anematodetoday at 3:54 AM

Looks like a very sophisticated operation, and I feel for the maintainer who had his machine compromised.

The next incarnation of this, I worry, is that the malware hibernates somehow (e.g., if (Date.now() < 1776188434046) { exit(); }) to maximize the damage.

show 1 reply
aeneas_orytoday at 8:11 AM

Check if your machine was affected with this tool: https://github.com/aeneasr/was-i-axios-pwned

show 1 reply
fraywingtoday at 1:43 AM

Incredible uptick in supply chain attacks over the last few weeks.

I feel like npm specifically needs to up their game on SA of malicious code embedded in public projects.

show 2 replies
akerstentoday at 2:08 AM

Any good payload analysis been published yet? Really curious if this was just a one and done info stealer or if it potentially could have clawed its way deeper into affected systems.

show 1 reply
uticustoday at 1:30 AM

> March 31, around 01:00 UTC: community members file issues reporting the compromise. The attacker deletes them using the compromised account.

Interesting it got caught when it did.

show 1 reply
pianopatricktoday at 6:58 AM

Seems to me the root of the problem was that the guy was using the same device for all sorts of stuff.

Seems to me that one drastic tactic NPM could employ to prevent attacks like this is to use hardware security. NPM could procure and configure laptops with identity rooted in the laptop TPM instead of 2FA. Configure the NPM servers so that for certain repos only updates signed with the private key in the laptop TPM can be pushed to NPM. Each high profile repo would have certain laptops that can upload for that repo. Set up the laptop with a minimal version of Linux with just the command line tools to upload to NPM, not even a browser or desktop environment. Give those laptops to maintainers of high profile repos for free to use for updates.

Then at update time, the maintainer just transfers the code from their dev machine to the secure laptop via USB drive or CD and pushes to NPM from the special laptop.

show 1 reply
momo_devtoday at 7:07 AM

this is why i pin every dependency hash in my python projects. pip install --require-hashes with a locked requirements file catches exactly this, if the package hash changes unexpectedly the install fails. surprised this isn't the default in the npm ecosystem

show 1 reply
charcircuittoday at 2:04 AM

Does OIDC flow block this same issue of being able to use a RAT to publish a malicious package?

show 3 replies
nurettintoday at 5:47 AM

I never understood why all the CAS tutorials pushed axios. This was before vite and build-scripts was how you did react. After the compromise I reviewed some projects and converted them to pure JS fetch and vite.

show 1 reply
lrvicktoday at 3:44 AM

I ask this on every supply chain security fail: Can we please mandate signing packages? Or at least commits?

NPM rejected PRs to support optional signing multiple times more than a decade ago now, and this choice has not aged well.

Anyone that cannot take 5 minutes to set up commit signing with a $40 usb smartcard to prevent impersonation has absolutely no business writing widely depended upon FOSS software.

Normalized negligence is still negligence.

show 2 replies
arafeqtoday at 7:36 AM

[dead]

scottburgess33today at 9:43 AM

[dead]

kanehorikawatoday at 6:10 AM

[dead]

lexcamisa54today at 6:04 AM

[dead]

JackSmith_YCtoday at 5:52 AM

[dead]