{"id":"MAL-2026-6790","summary":"Malicious code in debugcli (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (ff9ad8188112d91f0ea673971f4421ca96dc7943ba12d65c7339c1aa75c2226e)\nThe package name `debugcli` shadows the popular `debug` package, and `index.js` is a thin re-export (`module.exports = require('debug')`) so callers observe legitimate behavior. The real payload runs via `\"postinstall\": \"node install.js\"` in package.json. On install, `install.js` performs: (1) bulk credential-file harvest — reads `~/.aws/credentials`, `~/.aws/config`, `~/.npmrc`, `~/.ssh/config`, `~/.pypirc`, `~/.netrc`, `~/.docker/config.json`, `~/.kube/config`, gcloud application_default_credentials, `.git-credentials`, Azure tokens, composer auth, and walks the current working directory upward collecting `.env`, `.env.local`, `.env.production`, `.env.development`; (2) process.env scraping — iterates `process.env` and filters keys matching TOKEN/SECRET/PASSWORD/API_KEY/AUTH/PRIVATE/AWS_*/GITHUB_*/NPM_*/OPENAI/ANTHROPIC/DATABASE_URL/STRIPE/TWILIO patterns; (3) browser wallet theft — locates Chrome extension Local Extension Settings for MetaMask (extension id `nkbihfbeogaeaoehlefnkodbecgpgknn`) and TrustWallet (`egjidjbpglichdcondbcbdnbeeppgdph`) and archives the vault directories via `powershell Compress-Archive` on Windows or `tar czf... --exclude=LOCK` on Unix; (4) exfiltration — POSTs collected env vars, credential files,.env contents, and wallet archives to `api.telegram.org/bot\u003ctoken\u003e/sendMessage` and `/sendDocument`, with the bot token and chat_id stored as XOR-encoded byte arrays (`ENC_TOKEN`, `ENC_CHAT`) decoded at runtime using the current lodash package version fetched from `registry.npmjs.org/lodash` dist-tags.latest as the XOR key; (5) evasion — `isSandbox()` checks CPU/RAM, hostname regex (`sandbox|malware|virus|sample|cuckoo|any.run|hybrid`), analysis env vars, and HOME directory age, and skips execution on analysis machines; a per-machine hashed lockfile prevents re-execution within 24h; and finally `fs.unlinkSync(__filename)` removes install.js after exfil.\n\n## Source: ghsa-malware (b27bc49b2d8ef30848d427f7d6ec702eaed3b5bcc49f5fd4384183f228e2c50a)\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 (dd4fa31ed29d493ac05d6ec17a90f51fe68008b674268e1751c4b25792703b8d)\nThe OpenSSF Package Analysis project identified 'debugcli' @ 4.3.9 (npm) as malicious.\n\nIt is considered malicious because:\n\n- The package communicates with a domain associated with malicious activity.\n","aliases":["GHSA-86fh-6m37-f9v4"],"modified":"2026-07-08T15:32:22.489142405Z","published":"2026-07-03T20:05:34Z","database_specific":{"malicious-packages-origins":[{"versions":["4.3.9"],"source":"ossf-package-analysis","sha256":"dd4fa31ed29d493ac05d6ec17a90f51fe68008b674268e1751c4b25792703b8d","import_time":"2026-07-05T23:26:10.134020118Z","modified_time":"2026-07-05T22:53:57Z"},{"modified_time":"2026-07-03T20:05:34Z","versions":["4.3.5"],"source":"ossf-package-analysis","sha256":"fe37371be7402296078fd35f37924e6554d9ac7974d4318282c5c1456388c3b7","import_time":"2026-07-05T23:26:10.216110918Z"},{"sha256":"b27bc49b2d8ef30848d427f7d6ec702eaed3b5bcc49f5fd4384183f228e2c50a","import_time":"2026-07-07T16:09:37.8401291Z","id":"GHSA-86fh-6m37-f9v4","modified_time":"2026-07-07T15:29:38Z","ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}],"source":"ghsa-malware"},{"id":"IN-MAL-2026-008068","modified_time":"2026-07-08T14:34:04Z","versions":["4.3.8"],"source":"amazon-inspector","sha256":"ff9ad8188112d91f0ea673971f4421ca96dc7943ba12d65c7339c1aa75c2226e","import_time":"2026-07-08T15:19:06.127333734Z"},{"id":"IN-MAL-2026-008071","modified_time":"2026-07-08T14:34:28Z","versions":["4.3.5"],"source":"amazon-inspector","sha256":"6eaaeee205d88b0906246a742c5583487758ee584373457a5a0b6a60688e2ff8","import_time":"2026-07-08T15:19:06.550071712Z"},{"modified_time":"2026-07-08T14:34:18Z","versions":["4.3.7"],"source":"amazon-inspector","sha256":"831256acce5cdb9e52854ada150a415928cb28c9dca30e31efc96259287c0a29","import_time":"2026-07-08T15:19:06.434614722Z","id":"IN-MAL-2026-008070"},{"id":"IN-MAL-2026-008067","modified_time":"2026-07-08T14:33:56Z","versions":["4.4.1"],"source":"amazon-inspector","sha256":"8f822b2d8f0ae21a6e25a1f4ac0a5dff482e359852d575047deffe15124b6a64","import_time":"2026-07-08T15:19:06.028558117Z"},{"import_time":"2026-07-08T15:19:06.680705478Z","id":"IN-MAL-2026-008072","modified_time":"2026-07-08T14:34:40Z","versions":["4.3.6"],"source":"amazon-inspector","sha256":"bde7b9c84fd8da0192bbab30b047994ad5cc2e834c6b5e7129b7230526258a36"},{"id":"IN-MAL-2026-008069","modified_time":"2026-07-08T14:34:11Z","versions":["4.3.9"],"source":"amazon-inspector","sha256":"f3ed5d51fee2f7766b66f85a3396e49568c22be9970cab60647102b7f70ab1e1","import_time":"2026-07-08T15:19:06.325148623Z"}]},"references":[{"type":"ADVISORY","url":"https://github.com/advisories/GHSA-86fh-6m37-f9v4"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/debugcli/v/4.3.8"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/debugcli/v/4.3.5"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/debugcli/v/4.3.7"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/debugcli/v/4.4.1"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/debugcli/v/4.3.6"},{"type":"PACKAGE","url":"https://www.npmjs.com/package/debugcli/v/4.3.9"}],"affected":[{"package":{"name":"debugcli","ecosystem":"npm","purl":"pkg:npm/debugcli"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}],"versions":["4.3.9","4.3.5","4.3.8","4.3.7","4.4.1","4.3.6"],"database_specific":{"cwes":[{"description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code","cweId":"CWE-506"},{"name":"Embedded Malicious Code","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."},{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"},{"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"},{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"}],"indicators":{"evidence_files":[{"path":"package.json","sha256":"5002862896ed258d919235c64457fe2a78aba979cdb3f1bab465af4d2d14cbbe","tlsh":"e7d02b144d7095331ac566a19e674006bfb51e57010cbc5c23c71148475e67749fe21f"},{"path":"install.js","sha256":"62c57137e671c270c1d86fcd4916418facf3ac52764cd64fe0c028f483b24a48","tlsh":"a94293fb16f71128b157e6ac960ba015212af143364af8a0b95c72951fce63481f2efd"}]},"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/debugcli/MAL-2026-6790.json"}}],"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"}]}