{"id":"MAL-2026-12650","summary":"Malicious code in cnb-cnb-core (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (6d98cce19255e9c794f6211b2af4feb078a17256448ef693fbdb31cb1de27b97)\nOn require('cnb-cnb-core'), index.js loads _shim.js which downloads a platform-specific executable from string-obfuscated hosts (oob-worker.cf103-070.workers.dev, oob-worker.cf102-baf.workers.dev, oob-worker.cf100-416.workers.dev), writes it to /tmp or %TEMP% under decoy names (.cache_\u003crand\u003e, dotnet_diag_\u003crand\u003e.exe), chmods 0755, and spawns it detached via cp.spawn('/bin/sh', ['-c', fp+' &'], {detached:true, stdio:'ignore'}) or spawn('cmd',...). When HTTP fetch fails, _shim.js falls back to a DNS-TXT covert channel under *.dl.wel1.ru, reassembles base64-encoded chunks from TXT records, and pipes them into the same write+chmod+spawn sink. Destination hostnames and DNS domains are constructed at runtime by joining split fragments (e.g., ['oob-work','er','.cf103-070.worker','s.','dev'].join('')) to defeat static scanners. Cover-story controls (DISABLE_TELEMETRY / ANALYTICS_OPT_OUT / DO_NOT_TRACK env checks, an.analytics_state cooldown flag, a node-fetch User-Agent, and dotnet_diag / analytics decoy names) frame the behavior as diagnostics while executing attacker-supplied bytes with no hash or signature verification.\n","modified":"2026-08-05T14:36:08.048800382Z","published":"2026-08-05T14:00:22Z","database_specific":{"malicious-packages-origins":[{"modified_time":"2026-08-05T14:00:22Z","sha256":"6d98cce19255e9c794f6211b2af4feb078a17256448ef693fbdb31cb1de27b97","source":"amazon-inspector","versions":["35.2.7"],"id":"IN-MAL-2026-015126","import_time":"2026-08-05T14:20:04.72319669Z"}]},"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/cnb-cnb-core/v/35.2.7"}],"affected":[{"package":{"name":"cnb-cnb-core","ecosystem":"npm","purl":"pkg:npm/cnb-cnb-core"},"versions":["35.2.7"],"database_specific":{"indicators":{"evidence_files":[{"tlsh":"48a197aa166670184b70d7e4c61b5816f55bf6637380c194fb9c99984ff212482b2efc","path":"_shim.js","sha256":"deaa0c7c9a1ebb81830178f90fbd47b0e12cccc32ada78962d2b36ea9a6e38f4"}],"package_integrity":[{"hashes":{"sha1":"4b5770779677c12abcb187d16e9dc7f5443996db","sha512_sri":"sha512-mlpHWSGGqjwUmrU+Eo4v/opryca2khMOrqWWi+If1jfb+jY51eJkuL7KnipL6vnYnActTsKHdkptfvPIAswaNA=="},"filename":"cnb-cnb-core-35.2.7.tgz"}]},"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/cnb-cnb-core/MAL-2026-12650.json","cwes":[{"cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature.","name":"Embedded Malicious Code"}]}}],"schema_version":"1.8.0","credits":[{"name":"Amazon Inspector","contact":["inspector-research@amazon.com"],"type":"FINDER"}]}