{"id":"MAL-2026-5677","summary":"Malicious code in worker-build (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (0e11b6161f4fe3c591bddadbf275003eaac33a1478cda408ac51d85230292e6d)\npackage.json declares `\"postinstall\": \"node main.js\"`, so installation of worker-build@9.0.1 unconditionally executes main.js on `npm install`. main.js collects host identity (os.hostname(), os.userInfo().username, os.homedir(), process.cwd(), process.argv), reads the consumer's package.json, runs `git config --get remote.origin.url`, and iterates a hardcoded list of credential-shaped environment variables (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN, NPM_TOKEN, GITHUB_TOKEN, GITLAB_TOKEN, API_KEY, SECRET_KEY, PASSWORD, TOKEN, DATABASE_URL, MONGODB_URI, REDIS_URL), capturing the first 50 characters of each populated value. The collected JSON payload is POSTed in cleartext to `http://jh4wt1kccd0ul174qgmge9n8izozcu0j.oastify.com/exfil` and `/api/exfil`, with an additional DNS lookup against the same host as a side-channel beacon. The package name mimics legitimate Cloudflare Workers build tooling, positioning the package for dependency-confusion against installers that misresolve an internal name to the public registry.\n\n## Source: ghsa-malware (2e93efdba4287480cd7e19a76b82fc17c7b7c9bd446fdc35d0ac2bfab1f628df)\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\n## Source: ossf-package-analysis (b5005e4bec545b403f3be10160a08d634d34b5d8ab8e76a185a4a5ba34706719)\nThe OpenSSF Package Analysis project identified 'worker-build' @ 9.0.1 (npm) as malicious.\n\nIt is considered malicious because:\n\n- The package communicates with a domain associated with malicious activity.\n","aliases":["GHSA-7wpx-89q3-rcf4"],"modified":"2026-06-16T01:46:48.019113138Z","published":"2026-06-11T19:15:51Z","database_specific":{"malicious-packages-origins":[{"versions":["9.0.1"],"import_time":"2026-06-11T20:18:48.880228498Z","sha256":"b5005e4bec545b403f3be10160a08d634d34b5d8ab8e76a185a4a5ba34706719","source":"ossf-package-analysis","modified_time":"2026-06-11T19:15:51Z"},{"versions":["9.0.1"],"import_time":"2026-06-12T19:44:13.900130629Z","sha256":"0e11b6161f4fe3c591bddadbf275003eaac33a1478cda408ac51d85230292e6d","id":"IN-MAL-2026-006152","source":"amazon-inspector","modified_time":"2026-06-12T19:10:03Z"},{"versions":["9.0.1"],"sha256":"ed7e7167b2760d9163594db0ea3686c528f7ca22506e601a92ca29c00305763a","import_time":"2026-06-12T19:44:14.047794186Z","source":"amazon-inspector","id":"IN-MAL-2026-006153","modified_time":"2026-06-12T19:10:04Z"},{"ranges":[{"events":[{"introduced":"0"}],"type":"SEMVER"}],"import_time":"2026-06-16T01:31:34.709385135Z","sha256":"2e93efdba4287480cd7e19a76b82fc17c7b7c9bd446fdc35d0ac2bfab1f628df","source":"ghsa-malware","id":"GHSA-7wpx-89q3-rcf4","modified_time":"2026-06-16T00:05:26Z"}]},"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/worker-build/v/9.0.1"},{"type":"ADVISORY","url":"https://github.com/advisories/GHSA-7wpx-89q3-rcf4"}],"affected":[{"package":{"name":"worker-build","ecosystem":"npm","purl":"pkg:npm/worker-build"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}],"versions":["9.0.1"],"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"}],"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/worker-build/MAL-2026-5677.json","indicators":{"evidence_files":[{"path":"main.js","sha256":"80931ad380aa8062b65e68d3eac09696028ca963859b3b54878d3ff64cb87226","tlsh":"60a1a89542f0452101f62a85668b5111226bd2273f15ffd07ede02285f4eb5c97f2bfa"},{"path":"README.md","sha256":"26a6df896a7bf708c4be5e5cc3d4fac35452642a2402d6c2a03ce8d6d916ac27","tlsh":"9f2151ffd74263351324045a249c83a6beadf47ab3584440b99c814d918758b8737fa7"}],"domains":["jh4wt1kccd0ul174qgmge9n8izozcu0j.oastify.com","exfil-scan-b10999625627.jh4wt1kccd0ul174qgmge9n8izozcu0j.oastify.com"],"package_integrity":[{"hashes":{"sha512_sri":"sha512-sMHcNA940avuf6sae3jYlvcPVz3SZ6DcuvQqIQmh2mDTjTN0+W1LgNAk2C4oqacaHcVkgsLRW3f+e2HfvhbxXg==","sha1":"2509469937f105fd8c877da28240017ce18a435e"},"filename":"worker-build-9.0.1.tgz"}]}}}],"schema_version":"1.7.5","credits":[{"name":"Amazon Inspector","contact":["inspector-research@amazon.com"],"type":"FINDER"},{"name":"OpenSSF: Package Analysis","contact":["https://github.com/ossf/package-analysis","https://openssf.slack.com/channels/package_analysis"],"type":"FINDER"}]}