{"id":"MAL-2026-10478","summary":"Malicious code in @sectest429/hello-npm-world (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (479b9303d76a49dfacb402f0a906e32686b5d276e23f429678150e73e506550d)\nThe package advertises a single function `module.exports = function hello(name)` but ships a `preinstall.js` lifecycle script that runs automatically on `npm install` and performs reconnaissance unrelated to the advertised functionality. The script collects OS username, hostname, platform/arch, and the full running process list (`ps -eo comm=` on POSIX, `tasklist /fo csv /nh` on Windows), and issues an HTTP PUT to the AWS EC2 link-local IMDSv2 token endpoint at `169.254.169.254/latest/api/token` followed by a fetch of `/latest/meta-data/instance-id`. Results are written to `./exfil.log` in the installer's working directory. The file's own header comment self-describes as a 'SECURITY DEMO payload' proving that a trojanized package gets code execution at install time. Even though the current version writes locally rather than transmitting, the recon chain (process enumeration + cloud-instance fingerprinting) has no relationship to a hello-world library, runs without consent on every install, and pollutes the consumer's CWD with an artifact.\n\n## Source: ghsa-malware (11c60369d43860157d7d1d5e7740d89e0c0b4e759e89d162450e247e04b483a2)\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-q7w2-749v-c98p"],"modified":"2026-07-23T07:50:36.179750023Z","published":"2026-07-13T19:43:39Z","database_specific":{"malicious-packages-origins":[{"id":"IN-MAL-2026-010297","modified_time":"2026-07-13T19:43:39Z","versions":["1.0.3"],"source":"amazon-inspector","sha256":"479b9303d76a49dfacb402f0a906e32686b5d276e23f429678150e73e506550d","import_time":"2026-07-13T20:29:53.818014109Z"},{"sha256":"11c60369d43860157d7d1d5e7740d89e0c0b4e759e89d162450e247e04b483a2","import_time":"2026-07-16T07:05:35.359792806Z","id":"GHSA-q7w2-749v-c98p","modified_time":"2026-07-16T06:48:42Z","ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}],"source":"ghsa-malware"},{"sha256":"bc6fede3a020b1ba21b08eb42ecf72fc29be410abd3ec72d7e2fffd016fa52a1","import_time":"2026-07-20T13:14:42.011957003Z","id":"RLMA-2026-05462","modified_time":"2026-07-20T10:27:41Z","versions":["1.0.3"],"source":"reversing-labs"}]},"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/@sectest429/hello-npm-world/v/1.0.3"},{"type":"ADVISORY","url":"https://github.com/advisories/GHSA-q7w2-749v-c98p"}],"affected":[{"package":{"name":"@sectest429/hello-npm-world","ecosystem":"npm","purl":"pkg:npm/%40sectest429/hello-npm-world"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}],"versions":["1.0.3"],"database_specific":{"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/@sectest429/hello-npm-world/MAL-2026-10478.json","indicators":{"package_integrity":[{"filename":"hello-npm-world-1.0.3.tgz","hashes":{"sha512_sri":"sha512-0tFzSxXSai/YwM93Yd4TyxyIvTMH9qwpe0/Hlj9mXFjN9r8p41GpoXYabiNuTY4IteyLbMMEstjqe5fKOjOkIg==","sha1":"a6e32e2faa87a284734a306a1d46d5a074fd95b8"}}],"evidence_files":[{"path":"preinstall.js","sha256":"3e30fa449a92fcf6b97d27b936cba673c1a5dcc36369b50c4dbb0fb23e993468","tlsh":"e351b4a753fa72386da3d9dae60bc0634713c1096182eed8f69e07066f8755c62731e3"}]},"cwes":[{"description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code","cweId":"CWE-506"},{"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"},{"name":"ReversingLabs","contact":["https://www.reversinglabs.com"],"type":"FINDER"}]}