{"id":"MAL-2026-6356","summary":"Malicious code in safe-json-38bd (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (523c83ae906ad871cb1ea3ffef4c0ae4e2d9f717376b86e97f6575e47cbc640d)\npackage.json declares a postinstall hook (\"postinstall\": \"node run.js\") that executes run.js automatically on `npm install`. run.js imports os, fs, http, https, and child_process and gathers host identity and environment data: os.hostname(), os.userInfo(), os.platform(), process.env.USER, process.cwd(), plus filesystem reads via fs.readFileSync / fs.existsSync. The collected data is base64-encoded (Buffer.from(...).toString('base64')) and POSTed out via HTTP/HTTPS at multiple call sites in the same script. The package name has no documented purpose that would justify install-time host reconnaissance, base64 wrapping, or outbound POSTs. Combined fingerprints (lifecycle-hook auto-execute + host-identity collection + base64 encoding + outbound HTTP POST) match a credential / system-intel exfiltration dropper.\n","modified":"2026-06-23T22:46:23.758320976Z","published":"2026-06-23T21:40:03Z","database_specific":{"malicious-packages-origins":[{"id":"IN-MAL-2026-007371","import_time":"2026-06-23T22:31:27.021939725Z","modified_time":"2026-06-23T21:40:03Z","sha256":"523c83ae906ad871cb1ea3ffef4c0ae4e2d9f717376b86e97f6575e47cbc640d","source":"amazon-inspector","versions":["1.0.0"]}]},"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/safe-json-38bd/v/1.0.0"}],"affected":[{"package":{"name":"safe-json-38bd","ecosystem":"npm","purl":"pkg:npm/safe-json-38bd"},"versions":["1.0.0"],"database_specific":{"cwes":[{"description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code","cweId":"CWE-506"}],"indicators":{"evidence_files":[{"path":"package.json","sha256":"0a21781c4049f9ca7a0f82c2673ddfc6d6a9b4630add5ca4dce12c702837a1ce","tlsh":"ffe068288c203a3379c42aa80ca29257a7308f0f20143d2d92bb2928429bb3a747b55d"},{"path":"run.js","sha256":"cfb226521b98ad39c775f5cdd08ac995f01488895a0b9b093001d22f6f91cf11","tlsh":"5682d67219f64a1479a3eaade75fa4006523f1077a51eda0f28c73610fcf568c162af8"}],"package_integrity":[{"filename":"safe-json-38bd-1.0.0.tgz","hashes":{"sha512_sri":"sha512-LMqq2OLmo0J1NnhKUHgh1XyMMFZymtX4FOLQ0mHLEe5QRrsYEJoZbRzbYqMwVdyOg2RgiB+ZjX4K+EeKslaQsg==","sha1":"ebff9ecfbb5811543dbe78438d53efc81c49461e"}}]},"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/safe-json-38bd/MAL-2026-6356.json"}}],"schema_version":"1.7.5","credits":[{"name":"Amazon Inspector","contact":["inspector-research@amazon.com"],"type":"FINDER"}]}