r/reactjs • u/gajus0 • May 11 '26
Tanstack npm Packages Compromised
https://socket.dev/blog/tanstack-npm-packages-compromised-mini-shai-hulud-supply-chain-attack
464
Upvotes
r/reactjs • u/gajus0 • May 11 '26
95
u/gajus0 May 11 '26
A reminder to secure your npm environment:
https://gajus.com/blog/3-pnpm-settings-to-protect-yourself-from-supply-chain-attacks#2-set-blockexoticsubdeps
282
u/DannaWasHerName May 11 '26 edited May 11 '26
Sir, another supply chain attack has hit npm.
180
u/Crutchcorn May 11 '26
https://tanstack.com/blog/npm-supply-chain-compromise-postmortem
We just released our postmortem on how this occurred.
58
u/Esclamare May 11 '26
It looks like it only affects Tanstack/react-router?
39
u/Goodie__ May 11 '26
The one weekend I decide to sit down at home and play with modern react stuff and see what's changed is the same weekend tanstack gets compromised?
GG WP.
11
u/decho May 11 '26
Not to be confused with another recent attack on the unscoped
tanstackpackage which does not belong to the Tanstack org. Just name squatting turned malicious. I've read that Microsoft were well aware of this but chose to ignore the issue.But also, wtf man, so many organizations and popular packages getting hacked left and right, one would feel insecure installing anything from npm.
4
u/knpwrs May 12 '26
This is a great time to start using pnpm. Version 11 sets the default minimum package age to 24 hours, these malicious packages were detected in 20 minutes from publication.
3
u/swop13377 May 12 '26 edited May 12 '26
When I run
pnpm auditit has an entry for@tanstack/historywith Vulnerable versions:>=0while the github security page says it is only 1.161.9, 1.161.12 affected. This is confusing. Does somebody understand this?3
u/yksvaan May 12 '26
It has been known for years that less dependencies should be used and those that are actually needed preferably vendored locally. But noone givesa hoot really
-11
u/roynoise May 11 '26
Crap, seriously? Not a great time to be convincing my team to try react (for use cases where it's the best tool for the job).
-46
u/[deleted] May 12 '26
[removed] — view removed comment