Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

Malicious code in tokenization-util (npm)

0
Critical
Published: 06/25/2026 (06/25/2026, 05:29:26 UTC)
Source: GCVE Database
Product: tokenization-util

Description

--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (81f8a194aa79844110dede95f5f8c798d05c04c08f1a4f5d8822124b17c65fa6) The package advertises plain math/formatter helpers but index.js contains a heavily obfuscated payload concealed inside the calculateTokenPrice function. The payload is hidden behind ~1500 leading tab characters of visual padding, then uses two seeded Fisher-Yates string-shuffler decoders and String.fromCharCode splicing to reconstruct the identifiers 'constructor', 'require', and 'module' at runtime. The code resolves Function via yLb[kqz] (a string-shuffled property lookup for 'constructor'), uses that Function constructor to build a decoder from one shuffled blob, decodes a second scrambled blob into JS source, and invokes that source via Function(...)(3004). It also assigns the CommonJS require and module bindings to globalThis (global[require]=require; global[module]=module), giving the decoded code access to any Node built-in (network, fs, child_process) regardless of how the package is imported. None of this behavior is documented in the README or exposed through the advertised API. The combination of multi-layer obfuscation, visual concealment via tab padding, dynamic eval of decoded literals, and forced global exposure of require/module is the canonical shape of a hidden remote-code-execution backdoor in an npm utility package — the decoded payload runs whenever calculateTokenPrice is called by a consumer. ## Source: ghsa-malware (6889e1ba434ec22ee416286fff9c2917794ee60aa78361043e1742767ca877f2) Any computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer. The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.

Affected software

npmghsa
tokenization-util
Affected versions
=1.1.0=0.2.0

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

AILast updated: 07/11/2026, 10:13:17 UTC

Technical Analysis

The 'tokenization-util' npm package (versions 0.2.0 and 1.1.0) includes a heavily obfuscated malicious payload concealed inside the calculateTokenPrice function. The payload uses approximately 1500 leading tab characters for visual concealment, then employs two seeded Fisher-Yates string-shuffler decoders and String.fromCharCode splicing to reconstruct critical identifiers such as 'constructor', 'require', and 'module' at runtime. It dynamically creates a Function constructor to decode and execute a second scrambled JavaScript blob. The code assigns CommonJS require and module bindings to the global object, granting the decoded payload unrestricted access to Node.js built-in modules including network, filesystem, and child process capabilities. This backdoor executes whenever calculateTokenPrice is invoked, providing a remote code execution vector hidden behind obfuscation and undocumented in the package's API or README.

Potential Impact

Any system with the affected versions of the 'tokenization-util' package installed or running is considered fully compromised. The malicious payload grants attackers full control over the host environment by exposing Node.js built-in modules globally and executing arbitrary code. This can lead to theft of secrets, keys, and other sensitive data. Removal of the package alone does not guarantee eradication of the compromise, as the attacker may have established persistent backdoors or additional malware.

Mitigation Recommendations

No official patch or fix is currently available. Immediate removal of the 'tokenization-util' package versions 0.2.0 and 1.1.0 is strongly recommended. All secrets, keys, and credentials stored on affected systems should be rotated from a trusted, uncompromised environment. Due to the high likelihood of full system compromise, a thorough incident response and forensic analysis should be conducted to identify and remediate any persistent threats beyond the malicious package itself.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
MAL-2026-6440
Osv Schema Version
1.7.4
Aliases
["GHSA-wp9r-fqrq-cg5h"]
Ecosystems
["npm"]
Database Specific Severity
null
Cvss Version
null

Threat ID: 6a520ef568715ace4391dcc2

Added to database: 07/11/2026, 09:37:57 UTC

Last enriched: 07/11/2026, 10:13:17 UTC

Last updated: 07/29/2026, 08:42:47 UTC

Views: 59

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses