Skip to main content
MalwarePublished

eth-codegen (npm) · Malicious Code

Affects eth-codegenSource GCVE Database

0

Malicious package : remove eth-codegen and rotate any secrets on hosts that installed it.

Data as of 5 Aug 2026, 17:19 UTC

Classification

Malicious package

Published to npm · OSV MAL-2026-12371

What to do

Remove eth-codegen 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
npmeth-codegenAffected
  • =0.5.4
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 eth-codegen version 0.5.4 contains malicious code disguised as an Ethereum code generation utility. The package actually includes a hidden dropper concealed by whitespace padding, which executes code fetched from an anonymous mutable paste service. This allows arbitrary code execution in the Node.js process of any user importing the package. The malicious behavior is deliberately obfuscated to evade detection.

References

Community reviews

Loading reviews…