VYPR

npm · Malicious package advisory

Malware

web3-eth-util

MAL-2026-6325

Malicious code in web3-eth-util (npm)

Details


---
_-= Per source details. Do not edit below this line.=-_

## Source: amazon-inspector (f2e70ad91037bdc97e6b1ab8c95f5f2b5eecdb4524582d79dae5f240cbdbfc29)
Package name and metadata impersonate the legitimate @ethereumjs/util / ethereumjs-util packages: README is copied verbatim from the upstream ethereumjs project (and even instructs users to `npm install eth-util`), the contributor list and repository URL point at ethereumjs/ethereumjs-monorepo, but the package is published under a different name and ownership. The published dist/index.js (line ~57) contains `require("assertcore")` and package.json declares `"assertcore": "^3.1.7"` as a runtime dependency. The human-authored src/index.ts has no such import, and the browser build at dist.browser/index.js also omits it — the extra require is injected only into the Node-targeted build that ships in the npm tarball, so reviewers reading the GitHub source see clean code while `npm install` + `require('web3-eth-util')` silently loads the third-party 'assertcore' package in the consumer's Node process with full privileges. 'assertcore' is not part of the legitimate @ethereumjs/util sources and resembles a typosquat of the standard 'assert' module. The combination — brand impersonation of a widely used Ethereum utility package, source/dist divergence hiding the injection from GitHub readers, and a require-time pull of an unrelated third-party package — is a dependency-chain dropper pattern that delivers attacker-controlled code to anyone who installs and imports this package.

## Source: ghsa-malware (c81c00ea180f68b11352d3ca1a0c4c6597737ebfbca1f9d1a5a31591ac593360)
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.

Compromised versions (1)

  • 6.2.8

Any computer that installed or ran a compromised version should be considered fully compromised. Rotate every secret on that machine from a clean environment.