Skip to main content
MalwarePublished Updated

assertcore (npm) · Malicious Code

Affects assertcoreSource GCVE Database

0

Malicious package : remove assertcore and rotate any secrets on hosts that installed it.

Data as of 15 Jul 2026, 12:54 UTC

Classification

Malicious package

Published to npm · OSV MAL-2026-6365

What to do

Remove assertcore from every project, lockfile and image that pulls it in. Treat any host that installed it as compromised: rotate the credentials, tokens and keys it could read, from a clean machine.

Affected software

ProductAffectedFixed in
npmassertcoreAffected
  • =3.1.7
Fixed in–

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

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.

References

Community reviews

Loading reviews…