@wrenfield/viem (npm) · Malicious Code
Affects @wrenfield/viemSource GCVE Database
Malicious package : remove @wrenfield/viem and rotate any secrets on hosts that installed it.
Data as of 26 Oct 2026, 15:56 UTC
Malicious package
Published to npm · OSV MAL-2026-10571
What to do
Remove @wrenfield/viem 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
| Product | Affected | Fixed in |
|---|---|---|
| npm@wrenfield/viem | Affected
| Fixed in– |
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
Description
--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (fa26048a977a00adcd1ffc42ccf06110e3807bb2a3145a01fd01318dcfe79771) Package `@wrenfield/viem` impersonates the popular `viem` library (homepage viem.sh, repo wevm/viem); README and authors fields credit the real viem maintainers but the package itself is published under an unrelated `@wrenfield` scope. The shipped source under `_cjs/` mirrors viem's real code, but `package.json` rewrites the `abitype` dependency via npm alias: `"abitype": "npm:@wrenfield/abitype@1.2.4"`. The CommonJS entry `_cjs/index.js` calls `require("abitype")` at module load, so any installer who `require()`s or `import`s `@wrenfield/viem` transitively pulls and executes code from `@wrenfield/abitype@1.2.4` — a separate package under the same attacker-controlled scope, outside this tarball. The combination of brand impersonation of a top npm package plus a silent dependency redirect to an attacker-controlled namespace is the namespace-abuse / dependency-hijack pattern: the lure package looks legitimate on inspection, while the actual payload is delivered through the redirected dependency at first import.
References
- npmjs.com/package/@wrenfield/viem/v/2.53.4 (opens in a new tab)
- github.com/advisories/GHSA-pm4g-83cj-7858 (opens in a new tab)
- npmjs.com/package/@wrenfield/viem/v/2.53.3 (opens in a new tab)
- npmjs.com/package/@wrenfield/viem/v/2.53.1 (opens in a new tab)
- npmjs.com/package/@wrenfield/viem/v/2.53.2 (opens in a new tab)