Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

Malicious code in analysis-chart (npm)

0
Critical
Published: 06/23/2026 (06/23/2026, 15:25:06 UTC)
Source: GCVE Database
Product: analysis-chart

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

npmghsa
analysis-chart
Affected versions
=2.0.14=2.0.16=2.0.11=2.0.13=2.0.17=2.0.18=2.0.8=2.0.10=2.0.19=2.0.12=2.0.9=2.0.15=2.0.22=2.0.25=2.0.24=2.0.23=2.0.28=2.0.26=2.0.27=2.0.21=2.0.20

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

AILast updated: 06/26/2026, 22:33:59 UTC

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.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses