{"id":"MAL-2026-5419","summary":"Malicious code in @nstrlabs/auth (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (608be3457e7c809e60c1b76b9406489652f0ef708bfb97db2b6e0bb92b6836c2)\nOn `npm install`, the package's preinstall hook (`node index.js || true`, declared in package.json) automatically collects host identifiers — `os.hostname()`, `os.userInfo().username`, `__dirname`, and `process.cwd()` — and exfiltrates them through two channels: (1) a DNS lookup to a hex-encoded subdomain of `d8jbmnsqcfu78dfs8vdg34ohqhirb4pbg.oast.live` (an out-of-band interaction canary), and (2) an HTTP POST of the JSON payload to the bare IP `172.201.213.59` on port 9090 at path `/c`. The package ships no other functionality; the entire codebase is a beacon. Combined with the implausible version `99.0.0`, the `@nstrlabs` scope, and the self-described 'security research' purpose, this has the canonical shape of a dependency-confusion attack against a private `@nstrlabs/auth` namespace, where any organization that mistakenly resolves the public registry copy will leak internal hostnames and developer identities to the attacker.\n","modified":"2026-06-09T19:01:27.909015887Z","published":"2026-06-09T17:38:33Z","database_specific":{"malicious-packages-origins":[{"source":"amazon-inspector","sha256":"f9efcc731c346683d950fd8237f2ca892a7971d0cc340a48efcb60ba02abe851","import_time":"2026-06-09T17:45:53.587914077Z","id":"IN-MAL-2026-005084","modified_time":"2026-06-09T17:38:33Z","versions":["99.0.1"]},{"modified_time":"2026-06-09T17:38:34Z","versions":["99.0.1"],"source":"amazon-inspector","sha256":"fe577c55bca36113c93b1486725ad4f853775354bd6a7c6e0eb6c300652e2ae4","import_time":"2026-06-09T17:45:53.674662511Z","id":"IN-MAL-2026-005085"},{"source":"amazon-inspector","sha256":"608be3457e7c809e60c1b76b9406489652f0ef708bfb97db2b6e0bb92b6836c2","import_time":"2026-06-09T18:50:18.979896088Z","id":"IN-MAL-2026-005140","modified_time":"2026-06-09T17:55:11Z","versions":["99.0.0"]},{"id":"IN-MAL-2026-005141","modified_time":"2026-06-09T17:55:12Z","versions":["99.0.0"],"source":"amazon-inspector","sha256":"6af43df85e84a095699136acc4e3a92111b93764db3d276288e842f3bb17e575","import_time":"2026-06-09T18:50:19.047105866Z"}]},"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/@nstrlabs/auth/v/99.0.1"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/@nstrlabs/auth/v/99.0.0"}],"affected":[{"package":{"name":"@nstrlabs/auth","ecosystem":"npm","purl":"pkg:npm/%40nstrlabs%2Fauth"},"versions":["99.0.1","99.0.0"],"database_specific":{"indicators":{"package_integrity":[{"filename":"auth-99.0.1.tgz","hashes":{"sha512_sri":"sha512-2obfqZkT8rhth75HuNv9/nO1eLpsiAOGz8GYOMQbMghC6oUdlUkH2LKQl4wH5IZDvICN5Ty0MVSRqlKFyiESLQ==","sha1":"9d2eed52709be5e8eddaec23eed885fe8661aa2c"}}],"domains":["7b2268223a227363616e2d383061353435396136636531222c2275223a22.7363616e222c2264223a222f686f6d652f7363616e2f6e6f64655f6d6f64.756c65732f406e7374726c6162732f61757468222c2263223a222f686f6d.d8jbmnsqcfu78dfs8vdg34ohqhirb4pbg.oast.live"],"evidence_files":[{"path":"index.js","sha256":"a5c8f88f5e6d4cf0276663c90c5a7a1541ccb5d8ccf5f0572eba978a471c2009","tlsh":"97f0e1e161a0d1f9db749590bdd4668457f3d656b04288f0dc4d0fcf46c24d05d7a9e1"},{"path":"package.json","sha256":"60d66ded9081740e219376d96da03a13fba029bfc8deb333b64ae7ed22146e3b","tlsh":"0ec012681920b4366b5182f169756c8d61e9821410844c044ae205b494b1b9c807d055"}]},"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/@nstrlabs/auth/MAL-2026-5419.json","cwes":[{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"},{"description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code","cweId":"CWE-506"}]}}],"schema_version":"1.7.5","credits":[{"name":"Amazon Inspector","contact":["inspector-research@amazon.com"],"type":"FINDER"}]}