MAL-2026-6456Malicious code in stitch-design (npm)
| Ecosystem | Package | Version |
|---|---|---|
| npm | stitch-design | 0.1.0 |
| npm | stitch-design | 0.1.1 |
{"modified":"2026-06-25T07:49:57Z","published":"2026-06-25T07:10:10Z","schema_version":"1.7.4","id":"MAL-2026-6456","summary":"Malicious code in stitch-design (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (81a0c5de3abe7924f58304e27e1537821c217c9348c060b31c5424407f9f10cc)\nThe npm package ships a preinstall lifecycle hook (scripts/preinstall.js) that, on `npm install`, reads classic installer-secret paths — ~/.gitconfig, ~/.git-credentials, ~/.ssh/*.pub, ~/.npmrc, ~/.docker/config.json — and runs subprocesses (`git config --global/--system user.email`, `gh api user`, `claude auth status`, `npm config get email`) to capture identity material. It regex-extracts every email-shaped string from the contents and issues HTTPS GETs to https://stitch-design.ai/api/v1?src=...&user=<email> for each match, with TLS verification explicitly disabled (`rejectUnauthorized: false`). The same harvester is duplicated in bin/cli.js (the package's `bin` entry `stitch-design`), so every CLI invocation after install repeats the credential-path reads and exfiltration. Both files carry cover-story comments claiming to be a temporary placeholder that just prints a notice, while ~150 lines of harvesting and exfil code execute first. The combination of preinstall auto-execution, reads from canonical credential paths, hardcoded remote destination, disabled TLS verification, and a misleading placeholder narrative is an unambiguous installer-side credential exfiltration attack.\n","affected":[{"package":{"ecosystem":"npm","name":"stitch-design"},"versions":["0.1.1","0.1.0"],"database_specific":{"cwes":[{"cweId":"CWE-506","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"}],"indicators":{"evidence_files":[{"path":"scripts/preinstall.js","sha256":"70e8cae5ddc8a2f0b7d87e204d9e25193daf565c067d6f02163b128f3fbd3ac6","tlsh":"2cc141b70aab233030d6e8ad974f5135a2abf1237505d5a0b81d73585fcd03856a1afe"}],"package_integrity":[{"filename":"stitch-design-0.1.1.tgz","hashes":{"sha1":"2a5ee21ffb314eb5b5ba6ae3bab65481f2906226","sha512_sri":"sha512-EO0rQUV/z0bLtn5EcP3NQoHEzpIMe1o3+H3PSGITtAyVzpjw5mgRQdOf4TM9jqUEAJbZaCUxg/8pWbdEZ3vmFQ=="}}]}}}],"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/stitch-design/v/0.1.1"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/stitch-design/v/0.1.0"}],"credits":[{"name":"Amazon Inspector","type":"FINDER","contact":["inspector-research@amazon.com"]}],"database_specific":{"malicious-packages-origins":[{"id":"IN-MAL-2026-007498","import_time":"2026-06-25T07:47:52.186125658Z","modified_time":"2026-06-25T07:10:10Z","sha256":"15633b34e54b4c8192085292f5f5826221502c77c904ab0130fbfd9e605bd692","source":"amazon-inspector","versions":["0.1.1"]},{"id":"IN-MAL-2026-007499","import_time":"2026-06-25T07:47:52.294044958Z","modified_time":"2026-06-25T07:10:16Z","sha256":"81a0c5de3abe7924f58304e27e1537821c217c9348c060b31c5424407f9f10cc","source":"amazon-inspector","versions":["0.1.0"]}]}}数据来源:OpenSSF Malicious Packages · Apache-2.0