Malicious code in @stellarshift/token-units (npm)
Description
The npm package @stellarshift/token-units versions 1.0.1 and 1.0.3 contains malicious code that executes remote scripts during installation. It advertises BigInt token-unit conversion helpers but includes a postinstall hook that downloads and runs code from an obfuscated URL without integrity checks. Execution is conditional on detecting specific enterprise collaboration clients (Lark/Feishu) and a VPN client (FortiClient), and it avoids continuous integration environments. This behavior indicates targeted compromise and evasion tactics unrelated to the advertised functionality.
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The @stellarshift/token-units npm package versions 1.0.1 and 1.0.3 includes a postinstall script that reconstructs a URL via XOR-decoding and downloads a remote script which it executes without integrity verification. The execution is gated by environment checks requiring the presence of collaboration clients Lark or Feishu and the FortiClient VPN, while skipping CI environments. This malicious behavior diverges from the package's advertised BigInt token-unit conversion helpers. The package effectively compromises any system where it is installed, potentially allowing full control by an external attacker.
Potential Impact
Any computer with this package installed should be considered fully compromised. The malicious postinstall script can execute arbitrary code with the privileges of the user installing the package. This may lead to theft of secrets, keys, and other sensitive data. Removal of the package does not guarantee elimination of all malicious components, as the attacker may have established persistent control. Immediate rotation of all secrets and keys from a separate, uncompromised system is required.
Defensive Guidance
Remove the @stellarshift/token-units package versions 1.0.1 and 1.0.3 immediately. Consider the affected system fully compromised and perform a thorough incident response. Rotate all secrets and keys from a different, trusted computer. There is no known patch or fixed version available. Avoid installing this package and monitor for any presence of it in your environment.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-15824
- Osv Schema Version
- 1.7.4
- Aliases
- ["GHSA-rj7g-9fgf-944x"]
- Ecosystems
- ["npm"]
Threat ID: 6a998f5facd9273b49192d4b
Added to database: 09/03/2026, 15:16:47 UTC
Last enriched: 09/07/2026, 20:09:38 UTC
Last updated: 10/04/2026, 05:01:27 UTC
Views: 73
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.