Malicious code in assertcoreutils (npm)
--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (1e53b085bfe045b4aeabe9ad77e1066ab0883f27304197377681191c3118b780) assertcoreutils impersonates the popular `chai` assertion library: the README, the `chai` keyword, the `lib/chai/` directory layout, and `lib/chai.js` are copied verbatim from chai. When a consumer runs `require('assertcoreutils')`, index.js calls `child_process.spawn('node', ['lib/chai/utils/addAssertion.js',...], { detached: true, stdio: 'ignore' })` followed by `.unref()`, launching a hidden, detached child that survives the parent and produces no console output. `lib/chai/utils/addAssertion.js` is encoded with obfuscator.io string-array / RC4-base64 obfuscation (hex-named identifiers `_0x2ff01b`, `_0x516b`, etc.) that hides a hardcoded HTTPS URL plus query-key; the child performs an HTTPS GET to that URL and passes the response body into `new Function('require', body)(require)`, giving the remote operator arbitrary Node-level code execution on every installer. The combination of typosquat lure, copied legitimate package contents as cover, obfuscated remote URL, detached silent child, and runtime `new Function` over fetched bytes is a supply-chain dropper. ## Source: ghsa-malware (0a5a896a613d498f5908e70719f1b9046f145713db6f66e2c5f4ef101ff46a2b) Any computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer. The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.
AI Analysis
Technical Summary
assertcoreutils is a malicious npm package designed as a supply-chain dropper by impersonating the chai assertion library. Upon requiring the package, it spawns a detached, silent child Node.js process that executes an obfuscated script. This script performs an HTTPS GET request to a hardcoded remote URL and executes the fetched response as arbitrary Node.js code using the Function constructor. This allows remote operators to execute arbitrary code on any system installing these versions of assertcoreutils, effectively compromising the host environment.
Potential Impact
Installation or use of assertcoreutils versions 2.3.2 and 2.3.3 results in arbitrary remote code execution on the host system. This compromises system integrity and security, enabling attackers to run any code with the privileges of the installing user. The malicious package is a supply-chain attack vector that can lead to widespread compromise if used in development or production environments.
Mitigation Recommendations
No official patch or remediation is currently documented. Users should immediately remove and avoid installing assertcoreutils versions 2.3.2 and 2.3.3. Verify dependencies to ensure this malicious package is not included transitively. Use trusted package sources and consider implementing package integrity verification mechanisms. Monitor vendor advisories for updates or official fixes.
Malicious code in assertcoreutils (npm)
Description
--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (1e53b085bfe045b4aeabe9ad77e1066ab0883f27304197377681191c3118b780) assertcoreutils impersonates the popular `chai` assertion library: the README, the `chai` keyword, the `lib/chai/` directory layout, and `lib/chai.js` are copied verbatim from chai. When a consumer runs `require('assertcoreutils')`, index.js calls `child_process.spawn('node', ['lib/chai/utils/addAssertion.js',...], { detached: true, stdio: 'ignore' })` followed by `.unref()`, launching a hidden, detached child that survives the parent and produces no console output. `lib/chai/utils/addAssertion.js` is encoded with obfuscator.io string-array / RC4-base64 obfuscation (hex-named identifiers `_0x2ff01b`, `_0x516b`, etc.) that hides a hardcoded HTTPS URL plus query-key; the child performs an HTTPS GET to that URL and passes the response body into `new Function('require', body)(require)`, giving the remote operator arbitrary Node-level code execution on every installer. The combination of typosquat lure, copied legitimate package contents as cover, obfuscated remote URL, detached silent child, and runtime `new Function` over fetched bytes is a supply-chain dropper. ## Source: ghsa-malware (0a5a896a613d498f5908e70719f1b9046f145713db6f66e2c5f4ef101ff46a2b) Any computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer. The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.
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
assertcoreutils is a malicious npm package designed as a supply-chain dropper by impersonating the chai assertion library. Upon requiring the package, it spawns a detached, silent child Node.js process that executes an obfuscated script. This script performs an HTTPS GET request to a hardcoded remote URL and executes the fetched response as arbitrary Node.js code using the Function constructor. This allows remote operators to execute arbitrary code on any system installing these versions of assertcoreutils, effectively compromising the host environment.
Potential Impact
Installation or use of assertcoreutils versions 2.3.2 and 2.3.3 results in arbitrary remote code execution on the host system. This compromises system integrity and security, enabling attackers to run any code with the privileges of the installing user. The malicious package is a supply-chain attack vector that can lead to widespread compromise if used in development or production environments.
Mitigation Recommendations
No official patch or remediation is currently documented. Users should immediately remove and avoid installing assertcoreutils versions 2.3.2 and 2.3.3. Verify dependencies to ensure this malicious package is not included transitively. Use trusted package sources and consider implementing package integrity verification mechanisms. Monitor vendor advisories for updates or official fixes.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-10491
- Osv Schema Version
- 1.7.4
- Aliases
- []
- Ecosystems
- ["npm"]
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a55ff9c68715ace432f67a8
Added to database: 07/14/2026, 09:21:32 UTC
Last enriched: 07/14/2026, 09:51:53 UTC
Last updated: 07/24/2026, 07:20:37 UTC
Views: 16
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.