Malicious code in candy-candy-core (npm)
The candy-candy-core npm package version 35.2.7 contains malicious code that executes upon import. It downloads a platform-specific binary from attacker-controlled domains, writes it to temporary directories under decoy filenames, sets executable permissions, and spawns it detached via shell commands. The package uses obfuscation and telemetry-style comments to disguise its malicious behavior and maintains persistence through a lockfile. This behavior constitutes remote binary execution triggered simply by requiring the package.
AI Analysis
Technical Summary
The candy-candy-core package version 35.2.7 includes malicious code embedded in its index.js and _polyfill.js files. Upon requiring the package, it constructs attacker-controlled hostnames and downloads a platform-specific binary via HTTPS. The binary is saved to temporary directories with decoy filenames (e.g., dotnet_diag_<hex>.exe on Windows) and made executable. The package then spawns the binary detached using shell commands (spawn("/bin/sh", ...) or spawn("cmd", ...)). It uses obfuscation techniques such as string-splitting of hostnames and function names, decoy filenames, and misleading telemetry comments to evade detection. Persistence is maintained via a lockfile named analytics_state. This results in remote binary execution triggered by a simple import of the package.
Potential Impact
This malicious package enables remote code execution on any system that imports candy-candy-core version 35.2.7. The attacker-controlled binary can run arbitrary code with the privileges of the importing process, potentially leading to full system compromise, data theft, or further malware deployment. The obfuscation and persistence mechanisms increase the difficulty of detection and removal.
Mitigation Recommendations
No official patch or remediation is currently documented. Users should immediately stop using candy-candy-core version 35.2.7 and remove it from their environments. Audit systems for the presence of the decoy binaries and the analytics_state lockfile. Consider blocking the identified attacker-controlled domains at the network level. Monitor for suspicious child processes spawned by node.js applications. Patch status is not yet confirmed — check the vendor advisory or npm security advisories for updates.
Malicious code in candy-candy-core (npm)
Description
The candy-candy-core npm package version 35.2.7 contains malicious code that executes upon import. It downloads a platform-specific binary from attacker-controlled domains, writes it to temporary directories under decoy filenames, sets executable permissions, and spawns it detached via shell commands. The package uses obfuscation and telemetry-style comments to disguise its malicious behavior and maintains persistence through a lockfile. This behavior constitutes remote binary execution triggered simply by requiring the package.
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The candy-candy-core package version 35.2.7 includes malicious code embedded in its index.js and _polyfill.js files. Upon requiring the package, it constructs attacker-controlled hostnames and downloads a platform-specific binary via HTTPS. The binary is saved to temporary directories with decoy filenames (e.g., dotnet_diag_<hex>.exe on Windows) and made executable. The package then spawns the binary detached using shell commands (spawn("/bin/sh", ...) or spawn("cmd", ...)). It uses obfuscation techniques such as string-splitting of hostnames and function names, decoy filenames, and misleading telemetry comments to evade detection. Persistence is maintained via a lockfile named analytics_state. This results in remote binary execution triggered by a simple import of the package.
Potential Impact
This malicious package enables remote code execution on any system that imports candy-candy-core version 35.2.7. The attacker-controlled binary can run arbitrary code with the privileges of the importing process, potentially leading to full system compromise, data theft, or further malware deployment. The obfuscation and persistence mechanisms increase the difficulty of detection and removal.
Defensive Guidance
No official patch or remediation is currently documented. Users should immediately stop using candy-candy-core version 35.2.7 and remove it from their environments. Audit systems for the presence of the decoy binaries and the analytics_state lockfile. Consider blocking the identified attacker-controlled domains at the network level. Monitor for suspicious child processes spawned by node.js applications. Patch status is not yet confirmed — check the vendor advisory or npm security advisories for updates.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-12521
- Osv Schema Version
- 1.7.4
- Aliases
- []
- Ecosystems
- ["npm"]
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a735731bf8831d53913cf42
Added to database: 08/05/2026, 15:30:57 UTC
Last enriched: 08/05/2026, 15:45:29 UTC
Last updated: 08/05/2026, 15:45:29 UTC
Views: 2
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.