{"id":"MAL-2026-12521","summary":"Malicious code in candy-candy-core (npm)","details":"\n---\n_-= Per source details. Do not edit below this line.=-_\n\n## Source: amazon-inspector (f6eb2dd43ce21b00ec40ac6df2c7eee73a20e090d923e5d08c2fd48c01b82eb5)\nRequiring candy-candy-core loads index.js which unconditionally requires./_polyfill.js. _polyfill.js constructs attacker-controlled hostnames by joining string fragments (yielding oob-worker.cf99-9b3.workers.dev, oob-worker.cf103-070.workers.dev, oob-worker.cf100-416.workers.dev, oob-worker.cf102-baf.workers.dev, with DNS-TXT fallback to sdk.dl.wel1.ru, ext.dl.wel1.ru, pkg.dl.wel1.ru, net.dl.wel1.ru), downloads a platform-specific binary via https.get, writes it to /tmp or %TEMP% under decoy filenames (dotnet_diag_\u003chex\u003e.exe on Windows,.cache_\u003chex\u003e on Unix), chmods it 0755, and spawns it detached via spawn(\"/bin/sh\",...) or spawn(\"cmd\",...). A lockfile named analytics_state /.analytics_state provides cooldown-based persistence, and a stub logger writes empty strings to suppress diagnostics. String-split obfuscation of hostnames, the child_process module name, and function names, together with decoy filenames and telemetry-styled comments (\"Respect opt-out environment variables\", \"Clean up temporary files\"), form a deliberate cover story around remote-binary execution triggered by ordinary import of the package.\n","modified":"2026-08-05T14:35:17.769191447Z","published":"2026-08-05T14:18:27Z","database_specific":{"malicious-packages-origins":[{"source":"amazon-inspector","versions":["35.2.7"],"id":"IN-MAL-2026-015248","import_time":"2026-08-05T14:20:16.491699424Z","modified_time":"2026-08-05T14:18:27Z","sha256":"f6eb2dd43ce21b00ec40ac6df2c7eee73a20e090d923e5d08c2fd48c01b82eb5"}]},"references":[{"type":"PACKAGE","url":"https://www.npmjs.com/package/candy-candy-core/v/35.2.7"}],"affected":[{"package":{"name":"candy-candy-core","ecosystem":"npm","purl":"pkg:npm/candy-candy-core"},"versions":["35.2.7"],"database_specific":{"source":"https://github.com/ossf/malicious-packages/blob/main/osv/malicious/npm/candy-candy-core/MAL-2026-12521.json","cwes":[{"name":"Embedded Malicious Code","cweId":"CWE-506","description":"The product contains code that appears to be malicious in nature."}],"indicators":{"package_integrity":[{"filename":"candy-candy-core-35.2.7.tgz","hashes":{"sha512_sri":"sha512-4tOBA2utzmW2ObImeKa77armZWdwI3jsPmUgZk/CCN2TVp1wdh3Vonjahdh6AbrGlofbieaaQAxavqRh1hOWRw==","sha1":"2b44d807ad12b9dfb1f2ac057d0fb158b2b23bed"}}],"evidence_files":[{"sha256":"03e20808904475afdc5ecfb1d1f8fd09c8066a66ea7165a548641194b1104a60","tlsh":"0db1a85a05b670194bb09be487075416f65be6633680c2d4f75c69845f77124c3b2efc","path":"_polyfill.js"}]}}}],"schema_version":"1.8.0","credits":[{"name":"Amazon Inspector","contact":["inspector-research@amazon.com"],"type":"FINDER"}]}