{"id":"MAL-2026-5492","summary":"Malicious code in xnder-wrapper-module (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (6ff6538b76e9f03f65d8f16113bb6b606a59e59c172e9facb7de6ce0b523a7fb)\npackage.json declares `\"postinstall\": \"node scripts/script.js\"`, causing scripts/script.js to run automatically on every `npm install`. That file is the package's only functional code and is heavily obfuscated (obfuscator.io string-array with a 242-entry rotated table, RC4 decoder `String.fromCharCode(l.charCodeAt(t) ^ n[(n[r]+n[o])%256])`, control-flow flattening, webpack-bundled across 5 modules requiring path/os/fs/child_process and an HTTP client). The decoded flow constructs a URL via string concatenation tricks (`repeat('.')`, `concat('.')`), performs an HTTPS GET, writes the response body to a file under `os.tmpdir()` via `fs.writeFileSync(..., {flag:'w+'})`, and then runs `execSync(..., {windowsHide:true, cwd: os.tmpdir()})` against the dropped file — the standard fetch/drop/execute dropper shape with a sandbox-evasion flag. The package ships no other functionality; the README explicitly tells users the payload is unreviewed and recommends running it only inside a VM/Docker. Installing this package on a default `npm install` runs attacker-controlled code on the developer's machine.\n\n## Source: ghsa-malware (4d68068055d711593139864c52e7ccec4dd81369467be5d9ba6d30d47fd6e507)\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-jxcv-3994-r8xf"],"modified":"2026-06-11T08:01:33.776602171Z","published":"2026-06-10T06:43:00Z","database_specific":{"malicious-packages-origins":[{"modified_time":"2026-06-10T06:43:01Z","id":"GHSA-jxcv-3994-r8xf","import_time":"2026-06-10T07:48:35.930960089Z","source":"ghsa-malware","sha256":"4d68068055d711593139864c52e7ccec4dd81369467be5d9ba6d30d47fd6e507","ranges":[{"events":[{"introduced":"0"}],"type":"SEMVER"}]},{"modified_time":"2026-06-11T06:03:04Z","id":"IN-MAL-2026-005601","import_time":"2026-06-11T07:49:31.523521336Z","source":"amazon-inspector","versions":["1.0.0"],"sha256":"0f0582db05beca67194a76fc145fc80e8a15029cd6e721c052bd0110d40e96c0"},{"modified_time":"2026-06-11T06:03:03Z","sha256":"6ff6538b76e9f03f65d8f16113bb6b606a59e59c172e9facb7de6ce0b523a7fb","id":"IN-MAL-2026-005600","source":"amazon-inspector","versions":["1.0.2"],"import_time":"2026-06-11T07:49:31.435747997Z"},{"modified_time":"2026-06-11T06:03:07Z","import_time":"2026-06-11T07:49:31.71903038Z","sha256":"ab405ee6433a5260eed17e2ebacd6da8f7d71a62cb5a6f445a8487a0f77610cd","source":"amazon-inspector","versions":["1.0.1"],"id":"IN-MAL-2026-005603"}]},"references":[{"type":"ADVISORY","url":"https://github.com/advisories/GHSA-jxcv-3994-r8xf"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/xnder-wrapper-module/v/1.0.0"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/xnder-wrapper-module/v/1.0.2"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/xnder-wrapper-module/v/1.0.1"}],"affected":[{"package":{"name":"xnder-wrapper-module","ecosystem":"npm","purl":"pkg:npm/xnder-wrapper-module"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}],"versions":["1.0.0","1.0.2","1.0.1"],"database_specific":{"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/xnder-wrapper-module/MAL-2026-5492.json","cwes":[{"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","name":"Embedded Malicious Code","description":"The product contains code that appears to be malicious in nature."}],"indicators":{"evidence_files":[{"path":"scripts/script.js","sha256":"16ad36d69061ffd4b26b2bf6fb22c4ddcd92fd9414bb6202cd503a604973fadb","tlsh":"52a2a58b17ca30609213b4fca94f9ca6f7584d54c2a07c1e8a5de460e5b166cc7bceec"},{"path":"index.js","sha256":"ea32dee31c4cfdc35f623e489970a2c62a13f3c54d4eed885d9412cc6f68d15a","tlsh":"37014956982297fd9176eb629962c01af60a91336200d664feecc6901f732a14452dd9"}]}}}],"schema_version":"1.7.5","credits":[{"name":"Amazon Inspector","contact":["inspector-research@amazon.com"],"type":"FINDER"}]}