{"id":"MAL-2026-6476","summary":"Malicious code in typedecode (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (593662d3b4cda901642b713f419417807a33f3dca74e818f66e8d0cf9ebcf6e3)\nOn `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`.\n\n## Source: ghsa-malware (bedd4815e96aa992468ab037dbd2c342b8567f07ece45674dd8a274c4e479912)\nAny 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.\n","aliases":["GHSA-wfg2-fj8h-rxj6"],"modified":"2026-07-08T23:01:55.675572287Z","published":"2026-06-25T20:32:15Z","database_specific":{"malicious-packages-origins":[{"versions":["1.0.3"],"modified_time":"2026-06-25T20:32:15Z","sha256":"593662d3b4cda901642b713f419417807a33f3dca74e818f66e8d0cf9ebcf6e3","source":"amazon-inspector","import_time":"2026-06-25T21:07:19.004164785Z","id":"IN-MAL-2026-007535"},{"versions":["1.0.3","1.0.2","1.0.1"],"modified_time":"2026-07-06T18:59:37Z","sha256":"bedd4815e96aa992468ab037dbd2c342b8567f07ece45674dd8a274c4e479912","source":"ghsa-malware","import_time":"2026-07-06T19:53:47.990136151Z","id":"GHSA-wfg2-fj8h-rxj6"},{"versions":["1.0.2"],"modified_time":"2026-07-08T22:41:27Z","sha256":"94ab8efbe59223ab64fd1866492a3aca182db628a93768e6a558f69fe9675c3e","source":"amazon-inspector","import_time":"2026-07-08T22:51:27.103752859Z","id":"IN-MAL-2026-008844"},{"versions":["1.0.1"],"modified_time":"2026-07-08T22:41:38Z","sha256":"94d821385ecc3b8a01df48c17477068a85f0f8ce769cc308ff71d87ed2260c5f","source":"amazon-inspector","import_time":"2026-07-08T22:51:27.226215208Z","id":"IN-MAL-2026-008845"}]},"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/typedecode/v/1.0.3"},{"type":"ADVISORY","url":"https://github.com/advisories/GHSA-wfg2-fj8h-rxj6"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/typedecode/v/1.0.2"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/typedecode/v/1.0.1"}],"affected":[{"package":{"name":"typedecode","ecosystem":"npm","purl":"pkg:npm/typedecode"},"versions":["1.0.3","1.0.2","1.0.1"],"database_specific":{"indicators":{"package_integrity":[{"hashes":{"sha512_sri":"sha512-AYLVDi+jYd/IoL/P9fm4XUfvyWqATSRhWmCDLfbjR5Yikhj/iMyRvnP+4/CkD94PImI51nC2oD1NnpzPm+s4ag==","sha1":"1a0a49666eb3f934152a24c9538fd3a5419f52d4"},"filename":"typedecode-1.0.3.tgz"}],"evidence_files":[{"path":"dist/index.cjs","sha256":"99ead3c789a28a39b4aa58879b16c2903452cf85480b26aca09e111c7ace33ae","tlsh":"baf2938dbdf661000b5360b9150fd017f8699813a0bcdad8f68d9be02f5247497faace"}]},"cwes":[{"name":"Embedded Malicious Code","description":"The product contains code that appears to be malicious in nature.","cweId":"CWE-506"},{"name":"Embedded Malicious Code","description":"The product contains code that appears to be malicious in nature.","cweId":"CWE-506"},{"name":"Embedded Malicious Code","description":"The product contains code that appears to be malicious in nature.","cweId":"CWE-506"},{"name":"Embedded Malicious Code","description":"The product contains code that appears to be malicious in nature.","cweId":"CWE-506"}],"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/typedecode/MAL-2026-6476.json"}}],"schema_version":"1.7.5","credits":[{"name":"Amazon Inspector","contact":["inspector-research@amazon.com"],"type":"FINDER"}]}