frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

TanStack NPM Packages Compromised

https://github.com/TanStack/router/issues/7383
142•varunsharma07•1h ago

Comments

varunsharma07•1h ago
The Mini Shai-Hulud worm is actively compromising legitimate npm packages by hijacking CI/CD pipelines and stealing developer secrets. StepSecurity's OSS Package Security Feed first detected the attack in official @tanstack packages and is tracking its spread across the ecosystem in real time.
janice1999•22m ago
How did you guys detect it? Do you use it internally or do you monitor popular packages?
slopinthebag•28m ago
My decision to abandon the JS ecosystem and language entirely continues to pay off. What a mess...

I am, however, concerned that this will pwn my workplace. We don't use Tanstack but this seems self-propagating and I doubt all of our dependencies are doing enough to prevent it.

nine_k•19m ago
Abandon NPM in exchange for what? Cargo? Go get? Pip install?

Every package manager that does not analyze and run tests on the packages being uploaded (like Linux distros do) is vulnerable.

vsgherzi•13m ago
Even linux was subjected to an attack in xz utils. Granted it is much harder and they have a much better auditing problem (something npm should learn from). There really isn't a silver bullet here unfortunately. The industry as a whole needs to get more serious about this.
nine_k•11m ago
There's no silver bullet, but getting an exploit into xz took extraordinary effort, a long time, and bespoke code, because it needed to slip under the radar of actual humans reading the code. A shai hulud-style attack won't work with any reasonable Linux distro, like it does with npm.
ljm•12m ago
The community decided it's too much effort to vet code before publishing it so here we are.

(I'm not being stupid, even ten years ago there were arguments on HN about whether you should audit your dependencies)

I landed on the 'yes, you should know what code you are getting involved with' side.

jadbox•11m ago
Exactly, the only real way to escape this madness is if we move back to "Standard Libs" where your project only depends on 1-3 core libraries. For example, .NET and Java are almost entire 'kitchen sink' ecosystems. Arguably for simple projects, Go has a fairly large standard lib.
devttyeu•10m ago
Cargo is spiritually based on NPM so it's not much better.

Go Get is closer to always locking dependencies unless you explicitly upgrade them with a go get, so it's much much better in my view.

Yes, you can lock deps in NPM/Cargo/etc. but that's not the default. It is the default in Go.

In Go projects my policy for upgrading dependencies includes running full AI audit of all code changed across all dependencies, comes out to ~$200 in tokens every time but it gives those warm 'not likely to get pwned' vibes. And it comes with a nice report of likely breaking changes etc.

nine_k•4m ago
> comes out to ~$200 in tokens every time

BTW a curated mirror of <whatever ecosystem> packages, where every package is guaranteed to have been analyzed and tested, could be an easy sell now. Also relatively easy to create, with the help of AI. A $200 every time is less pleasant than, say, $100/mo for the entire org.

Docker does something vaguely similar for Docker images, for free though.

AgentME•1m ago
People are already scanning npm constantly. You can limit yourself to pre-scanned packages by setting npm's minimum release age setting to 1 or 2 days (a timeframe that all the recent high-profile malicious package versions were unpublished within).
voxl•3m ago
It's insane to me you spend $200 on a report you likely rarely read in detail or double check for correctness, yet you're doing it to feel good about security.
bakugo•17m ago
I highly recommend enforcing a minimum dependency release age of at least a week across all package managers used at your workplace. Most package managers support it now, and it will save you from the vast majority of these attacks.

https://news.ycombinator.com/item?id=47582632

Havoc•14m ago
Yeah it's a dumpster fire, but I also don't think the other major ecosystems like say python's pypi are any safer structurally
ChoosesBarbecue•24m ago
> Please be careful when revoking tokens. It looks like the payload installs a dead-man's switch at ~/.local/bin/gh-token-monitor.sh as a systemd user service (Linux) / LaunchAgent com.user.gh-token-monitor(macOS). It polls api.github.com/user with the stolen token every 60s, and if the token is revoked (HTTP 40x), it runs rm -rf ~/. (It looks like it might also have a bunch of persistence mechanisms. I haven't studied these closely.)

Jesus, that's vindictive.

ljm•22m ago
So when do we call out NPM as an easy supply chain vector and also Microsoft's ownership of NPM and their prioritisation of AI at any cost.

NPM is the windows of package managers right now.

nine_k•14m ago
Now that npm supports --before, yarn supports npmMinimumAge, and pnpm supports minimumReleaseAge, it's quite possible to stay safe and avoid acciasional bleeding-edge upgrades. Stay a couple months into the past, give testers time to look at newer releases and vet their safety (or report an exploit attempt).
Narretz•5m ago
--before doesn't save you globally, only min-release-age does, which is in npm since March iirc.
DrewADesign•10m ago
People have for years. The real question is do people enjoy not putting any thought into their super convenient JavaScript stack too much to actually do anything about it. Delaying updating to new packages assuming the vulnerability will be discovered in two days or whatever is putting a knee brace on a leg that needs to be amputated. Sooner or later there will be a vulnerability good enough to not be caught in a couple days, or a zero-day damaging enough that not updating immediately is a huge risk. Assuming they won’t be in anything critical enough to disastrously compromise your stack is wishful thinking at its finest.
fabian2k•15m ago
At least it was only online for 1-2 hours at most, and it didn't affect react-query. But still a bunch of quite well-known packages.

This doesn't really feel sustainable, you're rolling the dice every time the dependencies are updated.

gajus•13m ago
Reminder to secure your npm environments.

https://gajus.com/blog/3-pnpm-settings-to-protect-yourself-f...

Just a handful of settings to save a whole lot of trouble.

Narretz•9m ago
Isn't this article wrong about npm minumum release age. 1. The config is min-release-age. 2. For some reason they have chosen to make it days instead of minutes: https://docs.npmjs.com/cli/v11/using-npm/config#min-release-...

Completely unforced fragmentation of the dependency manager space imo

bakugo•5m ago
This confused me too, until I realized that the article is about pnpm, not npm (pnpm reads .npmrc for some reason, despite not having the same options as npm)
rvz•7m ago
And absolutely pin, pin, pin, ALL your dependencies.

If I see a package version dependency that looks like this: ^1.0.0 or even this: "*", then stop reading, pin it to a secure version immediately.

AgentME•3m ago
Npm's package-lock.json already handles pinning everything to exact versions, including subdependencies. Pinning exact versions in package.json doesn't affect your subdependencies.
jonchurch_•3m ago
its so wild to have seen this advice reverse course over the past year.

it used to be that projects that pinned deps were called out as being less secure due to not being able to receive updates without a publish.

different times, different threat model I suppose

rvz•11m ago
Once again, Shai-Hulud wrecking havock in the Javascript and Typescript ecosystems via NPM.

One of the worst ecosystems that has been brought into the software industry and it is almost always via NPM. Not even Cargo (Rust) or go mod (Golang) get as many attacks because at least with the latter, they encourage you to use the standard library.

Both Javascript and Typescript have none and want you to import hundreds of libraries, increasing the risk of a supply chain attack.

At this point, JS and TS are considered harmful.

sn0n•9m ago
As Theo goes live…
jonchurch_•6m ago
It is unfortunate, but this is evidence (IMO) that Trusted Publishing is still not secure, as an attacker inside your CI pipeline or with stolen repo admin creds can easily publish. This isnt new information, TP is not meant to guarantee against this, but migrating to TP away from local publish w/ 2fa introduces this class of attack via compomise of CI.

Going to Trusted Publishing / pipeline publishing removes the second factor that typically gates npm publish when working locally.

The story here, while it is evolving, seems to be that the attacker compromised the CI/CD pipeline, and because there is no second factor on the npm publish, they were able to steal the OIDC token and complete a publish.

Interesting, but unrelated I suppose, is that the publish job failed. So the payload that was in the malicious commit must have had a script that was able to publish itself w/ the OIDC token from the workflow.

What I want is CI publishing to still have a second factor outside of Github, while still relying on the long lived token-less Trusted Publisher model. AKA, what I want is staged publishing, so someone must go and use 2fa to promote an artifact to published on the npm side.

Otherwise, if a publish can happen only within the Github trust model, anyone who pwns either a repo admin token or gets malicious code into your pipeline can trivially complete a publish. With a true second factor outside the Github context, they can still do a lot of damage to your repo or plant malicious code, but at least they would not be able to publish without getting your second factor for the registry.

captn3m0•4m ago
The astral blog recently pointed out how they do release gates (manual approvals on release workflows) even with trusted publishing. And sadly, all of the documentation for trusted publishing (NPM/PyPi/Rubygems) doesn't even mention this possibility, let alone defaulting to it.

Ask HN: How are you preparing for interviews nowadays?

1•holden_nelson•1m ago•0 comments

Show HN: Compiled an archive of copium content for SF Bay Area engineers

https://copium.fyi/
1•average_ana•3m ago•0 comments

Uniform Rental Contracts Explain the U.S. Economy

https://www.thebignewsletter.com/p/fine-print-how-uniform-rental-contracts
1•connor11528•3m ago•0 comments

What Challenging a Bowling Monopoly Says About America

https://www.thebignewsletter.com/p/monopoly-round-up-what-challenging
1•connor11528•4m ago•0 comments

Counterfactual samples synthesizing for mitigating hallucination in LLMs

https://pubmed.ncbi.nlm.nih.gov/41729914/
1•fragmede•9m ago•1 comments

Tashk – a todo manager written in pure bash

https://github.com/agamoaltrove/tashk
1•agamoaltrove•11m ago•0 comments

The lab where Ford is trying to crack the code on cheap EVs

https://www.theverge.com/transportation/923704/ford-ev-skunkworks-lab-long-beach
2•dkobia•12m ago•0 comments

Elon Musk and Tim Cook among CEOs expected to accompany Trump on China trip

https://www.bbc.com/news/articles/c5yx757w048o
2•bigyabai•15m ago•0 comments

Tensor Shapes

https://pyrefly.org/en/docs/tensor-shapes/
2•rexledesma•15m ago•0 comments

French woman was told by doctors hantavirus symptoms were just anxiety

https://www.theguardian.com/world/2026/may/11/french-womandoctors-hantavirus-symptoms-hv-hondius
3•cdrnsf•15m ago•0 comments

OpenDyslexic: A Typeface for Dyslexia

https://opendyslexic.org/
2•oldfuture•16m ago•0 comments

Cloud Storage Rapid: Turbocharged object storage for AI and analytics

https://cloud.google.com/blog/products/storage-data-transfer/cloud-storage-rapid-turbocharges-obj...
1•leg•18m ago•0 comments

My First AI Project: An "Evidence-Based" System Architect. Looking for Feedback

https://github.com/maioio/genesis-architect
1•maioio•19m ago•0 comments

Surprise X-Ray Discovery May Explain Red Dots in Early Universe

https://www.sciencealert.com/surprise-x-ray-discovery-may-explain-strange-red-dots-in-early-universe
2•smooke•19m ago•0 comments

Swatch and Audemars Piguet Are Planning a Collaboration Watch

https://www.hodinkee.com/articles/its-official-swatch-and-audemars-piguet-are-planning-a-collabor...
1•nstj•22m ago•0 comments

Lawsuit accuses ChatGPT of helping gunman plan FSU mass shooting

https://www.pbs.org/newshour/nation/lawsuit-accuses-chatgpt-of-helping-gunman-plan-fsu-mass-shooting
5•anigbrowl•25m ago•0 comments

Childhood Computing

https://lilysthings.org/blog/childhood-computing/
2•birdculture•28m ago•0 comments

Olive CSS: Lisp powered vanilla CSS utility-class a la Tailwind

https://codeberg.org/jjba23/olive-css
2•PaulHoule•30m ago•0 comments

Gamingshuvo

https://blog.cloudflare.com/post-quantum-warp/
1•Gamingshuvo•31m ago•0 comments

Family of Florida mass shooting victim sues OpenAI in US court

https://www.reuters.com/legal/government/family-florida-mass-shooting-victim-sues-openai-us-court...
2•tartoran•33m ago•0 comments

Tech Companies Fail to Kill Colorado's 'Right to Repair' Law

https://www.techdirt.com/2026/05/11/tech-companies-fail-to-kill-colorados-right-to-repair-law/
3•cdrnsf•35m ago•0 comments

All Roads Lead to AI Rome

https://medium.com/towards-artificial-intelligence/all-roads-lead-to-ai-rome-1c601f1ec440
1•vektormemory•35m ago•1 comments

Tesla recalls every Cybertruck RWD ever sold because the wheels could fall off

https://finance.yahoo.com/markets/stocks/articles/tesla-recalls-every-cybertruck-rwd-140500699.html
5•cdrnsf•36m ago•0 comments

Day After Grizzly Attack, Dimwitted Tourist Takes Video of Bear from 5 Feet Away

https://cowboystatedaily.com/2026/05/08/day-after-grizzly-attack-dimwitted-tourist-takes-video-of...
3•Bender•36m ago•1 comments

People Who Don't Like People Are Making All of Our Decisions

https://www.theatlantic.com/ideas/2026/05/waymo-self-driving-cars/687119/
3•bentaber•37m ago•1 comments

Griffin PowerMate driver for modern macOS

https://github.com/jameslockman/Griffin-PowerMate-Driver
2•classichasclass•38m ago•0 comments

Making your developer platform agent-ready

https://hookdeck.com/blog/developer-platform-agent-ready
1•mooreds•38m ago•0 comments

Official PCIe 8.0 draft aims for 1 TB/s data rate

https://www.theregister.com/storage/2026/05/07/official-pcie-80-draft-aims-for-1-tb/s-data-rate/5...
1•Bender•39m ago•0 comments

What's in the 2026 Hugo Awards Voter Packet?

https://compellingsciencefiction.com/posts/what-s-in-the-2026-hugo-awards-voter-packet.html
1•mojoe•41m ago•0 comments

Essays on Dwarkesh's "Big Questions on AI"

https://12gramsofcarbon.com/p/why-is-ai-still-scaling-how-do-the
1•theahura•43m ago•0 comments