Malicious code in typedecode (npm)
--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (593662d3b4cda901642b713f419417807a33f3dca74e818f66e8d0cf9ebcf6e3) On `require('typedecode')` / `import 'typedecode'`, the bundled `dist/index.cjs` and `dist/index.js` execute an obfuscated import-time payload. A `bootstrap.js` IIFE exposes `require` and `module` on `global`, deobfuscates two large strings through a custom permutation (`YWG`), constructs a function via the `Function` constructor (`AQq(erE, YWG(fvm))`), invokes it on a second decoded payload to produce `XZs`, then calls `XZs(7942)` and brands `global._V = 'A6-Shadow-15'`. The deliberate placement of `require`/`module` on globals before the IIFE allows the decoded code to dynamically load arbitrary Node modules (fs, http, child_process, etc.) without any static reference. The package's API surface and inline comments are copied verbatim from the legitimate `decoders` package by nvie (including the email-regex comment and the pojo detection comment), and the README API (`object`, `array`, `optional`, `string`, `number`, `email`, `url`, `uuid`, `decode`/`verify`/`value`, `formatInline`, `formatShort`) duplicates that library — an impersonation lure to drive installs of the hidden loader. Author is the placeholder-style `chavanetsanastasia-netizen`. ## Source: ghsa-malware (bedd4815e96aa992468ab037dbd2c342b8567f07ece45674dd8a274c4e479912) 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.
AI Analysis
Technical Summary
The typedecode package (versions 1.0.1, 1.0.2, 1.0.3) contains an obfuscated import-time payload embedded in its bundled dist/index.cjs and dist/index.js files. This payload uses a custom string permutation and dynamic function construction to execute code that exposes Node.js require and module objects globally. This allows the malicious code to dynamically load arbitrary Node.js modules without static references, facilitating potentially unrestricted system access. The package's API and documentation mimic the legitimate decoders package by nvie to deceive users. The author is a placeholder name, indicating a malicious actor. The package is classified as fully compromising any system on which it is installed.
Potential Impact
Installation or execution of the affected typedecode package versions results in full system compromise. The malicious payload can load arbitrary Node.js modules and execute arbitrary code, potentially leading to data theft, system control, and persistence. All secrets and keys stored on the compromised system are at risk and should be considered exposed.
Mitigation Recommendations
No official patch or fix is currently available. Immediate removal of the typedecode package versions 1.0.1, 1.0.2, and 1.0.3 is strongly recommended. Systems with this package installed should be treated as fully compromised. All secrets and credentials stored on affected systems must be rotated from a secure, uncompromised environment. Monitor for any signs of persistent malicious activity and consider full system reimaging if compromise is suspected.
Malicious code in typedecode (npm)
Description
--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (593662d3b4cda901642b713f419417807a33f3dca74e818f66e8d0cf9ebcf6e3) On `require('typedecode')` / `import 'typedecode'`, the bundled `dist/index.cjs` and `dist/index.js` execute an obfuscated import-time payload. A `bootstrap.js` IIFE exposes `require` and `module` on `global`, deobfuscates two large strings through a custom permutation (`YWG`), constructs a function via the `Function` constructor (`AQq(erE, YWG(fvm))`), invokes it on a second decoded payload to produce `XZs`, then calls `XZs(7942)` and brands `global._V = 'A6-Shadow-15'`. The deliberate placement of `require`/`module` on globals before the IIFE allows the decoded code to dynamically load arbitrary Node modules (fs, http, child_process, etc.) without any static reference. The package's API surface and inline comments are copied verbatim from the legitimate `decoders` package by nvie (including the email-regex comment and the pojo detection comment), and the README API (`object`, `array`, `optional`, `string`, `number`, `email`, `url`, `uuid`, `decode`/`verify`/`value`, `formatInline`, `formatShort`) duplicates that library — an impersonation lure to drive installs of the hidden loader. Author is the placeholder-style `chavanetsanastasia-netizen`. ## Source: ghsa-malware (bedd4815e96aa992468ab037dbd2c342b8567f07ece45674dd8a274c4e479912) 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
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 typedecode package (versions 1.0.1, 1.0.2, 1.0.3) contains an obfuscated import-time payload embedded in its bundled dist/index.cjs and dist/index.js files. This payload uses a custom string permutation and dynamic function construction to execute code that exposes Node.js require and module objects globally. This allows the malicious code to dynamically load arbitrary Node.js modules without static references, facilitating potentially unrestricted system access. The package's API and documentation mimic the legitimate decoders package by nvie to deceive users. The author is a placeholder name, indicating a malicious actor. The package is classified as fully compromising any system on which it is installed.
Potential Impact
Installation or execution of the affected typedecode package versions results in full system compromise. The malicious payload can load arbitrary Node.js modules and execute arbitrary code, potentially leading to data theft, system control, and persistence. All secrets and keys stored on the compromised system are at risk and should be considered exposed.
Mitigation Recommendations
No official patch or fix is currently available. Immediate removal of the typedecode package versions 1.0.1, 1.0.2, and 1.0.3 is strongly recommended. Systems with this package installed should be treated as fully compromised. All secrets and credentials stored on affected systems must be rotated from a secure, uncompromised environment. Monitor for any signs of persistent malicious activity and consider full system reimaging if compromise is suspected.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-6476
- Osv Schema Version
- 1.7.4
- Aliases
- ["GHSA-wfg2-fj8h-rxj6"]
- Ecosystems
- ["npm"]
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a4c340d27e9c797195f7196
Added to database: 07/06/2026, 23:02:37 UTC
Last enriched: 07/06/2026, 23:17:22 UTC
Last updated: 07/31/2026, 14:58:42 UTC
Views: 20
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.