{"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=\u003cemail\u003e 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","modified":"2026-06-25T08:01:26.965920933Z","published":"2026-06-25T07:10:10Z","database_specific":{"malicious-packages-origins":[{"source":"amazon-inspector","versions":["0.1.1"],"id":"IN-MAL-2026-007498","import_time":"2026-06-25T07:47:52.186125658Z","modified_time":"2026-06-25T07:10:10Z","sha256":"15633b34e54b4c8192085292f5f5826221502c77c904ab0130fbfd9e605bd692"},{"versions":["0.1.0"],"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"}]},"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"}],"affected":[{"package":{"name":"stitch-design","ecosystem":"npm","purl":"pkg:npm/stitch-design"},"versions":["0.1.1","0.1.0"],"database_specific":{"indicators":{"evidence_files":[{"sha256":"70e8cae5ddc8a2f0b7d87e204d9e25193daf565c067d6f02163b128f3fbd3ac6","tlsh":"2cc141b70aab233030d6e8ad974f5135a2abf1237505d5a0b81d73585fcd03856a1afe","path":"scripts/preinstall.js"}],"package_integrity":[{"hashes":{"sha512_sri":"sha512-EO0rQUV/z0bLtn5EcP3NQoHEzpIMe1o3+H3PSGITtAyVzpjw5mgRQdOf4TM9jqUEAJbZaCUxg/8pWbdEZ3vmFQ==","sha1":"2a5ee21ffb314eb5b5ba6ae3bab65481f2906226"},"filename":"stitch-design-0.1.1.tgz"}]},"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/stitch-design/MAL-2026-6456.json","cwes":[{"description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code","cweId":"CWE-506"},{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"}]}}],"schema_version":"1.7.5","credits":[{"name":"Amazon Inspector","contact":["inspector-research@amazon.com"],"type":"FINDER"}]}