Skip to main content
MalwarePublished

magika-js (npm) · Malicious Code

Affects magika-jsSource GCVE Database

0

Malicious package : remove magika-js and rotate any secrets on hosts that installed it.

Data as of 19 Aug 2026, 14:29 UTC

Classification

Malicious package

Published to npm · OSV MAL-2026-14247

What to do

Remove magika-js 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
npmmagika-jsAffected
  • =4.1.1
Fixed in–

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

Description

The magika-js npm package is a typosquat of Google's legitimate magika library. It contains a postinstall script that collects various host identifiers such as hostname, platform, architecture, Node.js version, package name, npm lifecycle event, and timestamp. This data is sent as JSON to a hardcoded external endpoint without user consent or documented purpose. The package impersonates the legitimate Google project by referencing its GitHub repository. This behavior constitutes malicious code embedded in the package.

References

Community reviews

Loading reviews…