Malicious code in assertcore (npm)
The npm package 'assertcore' impersonates the popular 'chai' assertion library by including chai source code as a cover while differing in author and homepage. Upon requiring or importing 'assertcore', it spawns a detached, silent Node.js subprocess that executes heavily obfuscated code. This code fetches attacker-controlled JavaScript from a remote URL and executes it with full Node privileges, resulting in a supply-chain attack. The malicious behavior occurs at install or require time, potentially compromising any system using this package version. Removal of the package does not guarantee full remediation due to possible persistent compromise.
AI Analysis
Technical Summary
The 'assertcore' npm package version 3.1.7 is a malicious package that impersonates the legitimate 'chai' library by shipping chai source code as a cover. When required or imported, it spawns a detached Node.js subprocess running an obfuscated script that performs an HTTP GET request to an attacker-controlled URL. The response is executed dynamically with full Node.js privileges, enabling arbitrary code execution on the host system. This behavior constitutes a supply-chain attack that compromises the security of any system installing or using this package. The attack vector leverages obfuscation techniques and silent subprocess execution to evade detection.
Potential Impact
Systems with 'assertcore' version 3.1.7 installed or running are fully compromised, as the package executes attacker-supplied code with full Node.js privileges. This can lead to unauthorized access, data exfiltration, and control over the affected system. All secrets and keys stored on the compromised system should be considered exposed and require immediate rotation from a secure environment. Removing the package alone may not eliminate all malicious artifacts or backdoors introduced by the attacker.
Mitigation Recommendations
There is no official patch or fix available for this malicious package. The recommended mitigation is to immediately remove 'assertcore' version 3.1.7 from all systems. Assume full compromise of affected systems and rotate all secrets and credentials from a different, secure machine. Conduct a thorough investigation for persistence mechanisms or additional malware. Avoid installing packages with suspicious or impersonating names and verify package authenticity before use.
Malicious code in assertcore (npm)
Description
The npm package 'assertcore' impersonates the popular 'chai' assertion library by including chai source code as a cover while differing in author and homepage. Upon requiring or importing 'assertcore', it spawns a detached, silent Node.js subprocess that executes heavily obfuscated code. This code fetches attacker-controlled JavaScript from a remote URL and executes it with full Node privileges, resulting in a supply-chain attack. The malicious behavior occurs at install or require time, potentially compromising any system using this package version. Removal of the package does not guarantee full remediation due to possible persistent compromise.
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 'assertcore' npm package version 3.1.7 is a malicious package that impersonates the legitimate 'chai' library by shipping chai source code as a cover. When required or imported, it spawns a detached Node.js subprocess running an obfuscated script that performs an HTTP GET request to an attacker-controlled URL. The response is executed dynamically with full Node.js privileges, enabling arbitrary code execution on the host system. This behavior constitutes a supply-chain attack that compromises the security of any system installing or using this package. The attack vector leverages obfuscation techniques and silent subprocess execution to evade detection.
Potential Impact
Systems with 'assertcore' version 3.1.7 installed or running are fully compromised, as the package executes attacker-supplied code with full Node.js privileges. This can lead to unauthorized access, data exfiltration, and control over the affected system. All secrets and keys stored on the compromised system should be considered exposed and require immediate rotation from a secure environment. Removing the package alone may not eliminate all malicious artifacts or backdoors introduced by the attacker.
Mitigation Recommendations
There is no official patch or fix available for this malicious package. The recommended mitigation is to immediately remove 'assertcore' version 3.1.7 from all systems. Assume full compromise of affected systems and rotate all secrets and credentials from a different, secure machine. Conduct a thorough investigation for persistence mechanisms or additional malware. Avoid installing packages with suspicious or impersonating names and verify package authenticity before use.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-6365
- Osv Schema Version
- 1.7.4
- Aliases
- ["GHSA-8f9p-rcjg-hhx4"]
- Ecosystems
- ["npm"]
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a577eee68715ace43b4149f
Added to database: 07/15/2026, 12:37:02 UTC
Last enriched: 07/15/2026, 12:54:51 UTC
Last updated: 07/28/2026, 14:11:24 UTC
Views: 7
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.