security: pin @tanstack/history to 1.161.4 (GHSA-rmmr-r34h-pfm5, alert #29)#89
Merged
Merged
Conversation
@tanstack/history was flagged as malware (MAL-2026-3463 / "Mini Shai-Hulud is back" worm by TeamPCP). Pulled in transitively by @tanstack/react-router and @tanstack/router-core. Current upstream @tanstack/react-router@1.169.2 still pins the flagged 1.161.6, so an override is the only fix today. Pinning to 1.161.4 (published 2026-02-21, ~3.5 weeks pre-incident) rather than 1.161.5 (published within 7 h of 1.161.6 on 2026-03-15). OSV explicitly lists 1.161.9 and 1.161.12 as malicious; 1.161.6 was caught by GHSA's package-level >=0 marker. Static IoC scan of the new install (worm domains: git-tanstack.com, *.getsession.org, api.masscan.cloud) returns clean across all of node_modules. Closes code-scanning alert #29.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
@tanstack/historyto1.161.4viaoverridesinpackage.json, regeneratespackage-lock.json.Background
@tanstack/history@1.161.6is flagged by osv-scanner as malware: the "Mini Shai-Hulud is back" worm by the TeamPCP threat actor. The worm steals credentials and propagates itself to packages it can publish to.It landed in our
package-lock.jsonvia a Dependabot bulk minor-bump on 2026-03-17 (commit04e38da), as a transitive dep of@tanstack/react-routerand@tanstack/router-core. Both still pin@tanstack/history: 1.161.6in their latest1.169.2release — TanStack has not yet shipped a router patch that escapes the bad transitive, so anoverridesblock is the only available fix.Why pin to 1.161.4 (not 1.161.5)
>=0blanket marker; not in OSV's explicit version listOSV's authoritative malicious-version list contains only
1.161.9and1.161.12.1.161.6was matched by the package-level>=0marker, not an explicit content flag. Even so, the pin moves us back to a release pre-dating any suspect publish activity from the maintainer account.Exposure assessment
For this branch's regenerated lockfile and
node_modules:node_modules/for known worm domains (git-tanstack.com,*.getsession.org,api.masscan.cloud) — clean.@tanstack/history@1.161.4on disk inspected — no install scripts, no IoC strings, no obvious exfil patterns.For the previous state (lockfile pinned
1.161.6onmainfrom 2026-03-17 onwards):package-lock.jsonmatched the registry's currentdist.integrityfor1.161.6— no silent republish; the artifact installed was the one OSV examined.child_process,eval,atob,Buffer.from(.., 'base64'),fromCharCodearrays, hard-coded IPs, or token-name strings.install/preinstall/postinstallscripts, so nothing executed duringnpm installitself.@tanstack/react-router, which our apps import directly — so anynpm run dev/npm run buildbetween 2026-03-17 and now would have loaded the code in Node (Vite transforms) and emitted it into browser bundles.Suggested actions for maintainers:
npm install/npm ciagainst the unpinned lockfile loaded the suspect package. Review whetherGITHUB_TOKEN, deploy keys, or other secrets were in those job environments. Ephemeral runners limit but don't eliminate risk.apps/smartembuilt between 2026-03-17 and today — the bundle would have included@tanstack/history@1.161.6; if it was served to a browser, the browser-side payload (if any) reached users.npm installagainstmainin this window should treat their workstation as having executed unverified code. Static-scan evidence is reassuring but not conclusive. Prudent to rotate session-bound credentials (PATs, npm tokens) used in that window from a different machine, per OSV's standard guidance for any flagged MAL- advisory.Notes on osv-scanner
osv-scanner may still flag
1.161.4on this PR because the OSV record uses a>= 0SEMVER range (nofixedversion). The explicitversions: ['1.161.12', '1.161.9']list in the OSV record is the authoritative malicious set; the>= 0range is a precautionary blanket pending vendor cleanup. If the scan fails, the documented dismissal path is anosv-scanner.tomlentry:Not added here — leaving for maintainers to decide.
Test plan
npm installregenerates lockfile with@tanstack/history@1.161.4only (lockfile entries for parent deps still list1.161.6in theirdependenciesmetadata; resolution is via override).npm run dev:smartem:mock— Vite v8 dev server boots in ~1.2 s, no errors.Out of scope
@tanstack/react-routerwhen upstream releases one that escapes the bad transitive history, then drop the override.