Malicious code in analysis-chart (npm)
The npm package 'analysis-chart' contains malicious code in its postinstall hook that downloads and executes attacker-controlled native code on Windows machines. The payload is XOR-decrypted and injected into memory, then executed, resulting in full compromise of the developer's system. After execution, the package attempts to remove traces of the infection by deleting itself and cleaning up related files. The package's exposed API is a decoy and unrelated to the malicious behavior. The author metadata and repository references appear fabricated.
AI Analysis
Technical Summary
The 'analysis-chart' npm package versions listed execute a malicious postinstall script (install-hook.js) that downloads an opaque binary payload from a third-party GitHub release unrelated to the package author. This payload is XOR-decrypted with key 0x42 and injected into the installer's process memory on Windows using native Windows API calls (kernel32.dll, VirtualAlloc, RtlMoveMemory, VirtualProtect, CreateThread). This results in in-memory execution of arbitrary attacker-controlled native code during 'npm install'. Following payload execution, the script writes and runs a cleanup script that deletes the package folder, removes the package entry from package.json, and deletes the install-hook.js script itself to hinder forensic analysis. The package's index.js exports a plausible charting API as a decoy. The author metadata and repository are likely fabricated. Any system with this package installed should be considered fully compromised.
Potential Impact
Systems that install any affected version of 'analysis-chart' are subject to arbitrary native code execution on Windows during package installation, leading to full system compromise. Attackers gain control over the developer machine, potentially exposing all stored secrets and credentials. The package attempts to remove evidence of the infection, complicating detection and forensic investigation. Removal of the package alone does not guarantee elimination of the malicious payload or persistence mechanisms.
Mitigation Recommendations
No official patch or fix is available for this malicious package. Immediate removal of the 'analysis-chart' package from all affected systems is required. Assume full compromise of any system where this package was installed; rotate all secrets and credentials from a secure, uncompromised environment. Conduct thorough forensic analysis and system remediation to ensure no residual malware remains. Avoid installing packages from untrusted or suspicious sources and verify package authenticity before installation.
Malicious code in analysis-chart (npm)
Description
The npm package 'analysis-chart' contains malicious code in its postinstall hook that downloads and executes attacker-controlled native code on Windows machines. The payload is XOR-decrypted and injected into memory, then executed, resulting in full compromise of the developer's system. After execution, the package attempts to remove traces of the infection by deleting itself and cleaning up related files. The package's exposed API is a decoy and unrelated to the malicious behavior. The author metadata and repository references appear fabricated.
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 'analysis-chart' npm package versions listed execute a malicious postinstall script (install-hook.js) that downloads an opaque binary payload from a third-party GitHub release unrelated to the package author. This payload is XOR-decrypted with key 0x42 and injected into the installer's process memory on Windows using native Windows API calls (kernel32.dll, VirtualAlloc, RtlMoveMemory, VirtualProtect, CreateThread). This results in in-memory execution of arbitrary attacker-controlled native code during 'npm install'. Following payload execution, the script writes and runs a cleanup script that deletes the package folder, removes the package entry from package.json, and deletes the install-hook.js script itself to hinder forensic analysis. The package's index.js exports a plausible charting API as a decoy. The author metadata and repository are likely fabricated. Any system with this package installed should be considered fully compromised.
Potential Impact
Systems that install any affected version of 'analysis-chart' are subject to arbitrary native code execution on Windows during package installation, leading to full system compromise. Attackers gain control over the developer machine, potentially exposing all stored secrets and credentials. The package attempts to remove evidence of the infection, complicating detection and forensic investigation. Removal of the package alone does not guarantee elimination of the malicious payload or persistence mechanisms.
Mitigation Recommendations
No official patch or fix is available for this malicious package. Immediate removal of the 'analysis-chart' package from all affected systems is required. Assume full compromise of any system where this package was installed; rotate all secrets and credentials from a secure, uncompromised environment. Conduct thorough forensic analysis and system remediation to ensure no residual malware remains. Avoid installing packages from untrusted or suspicious sources and verify package authenticity before installation.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-6299
- Osv Schema Version
- 1.7.4
- Aliases
- ["GHSA-2h56-6c2c-2475"]
- Ecosystems
- ["npm"]
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a3ef7be27e9c79719ffd4fb
Added to database: 06/26/2026, 22:05:50 UTC
Last enriched: 06/26/2026, 22:33:59 UTC
Last updated: 07/28/2026, 23:20:54 UTC
Views: 14
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.
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.