VDB
Sign up

MAL-2026-16329

Malicious code in chai-as-viem (npm)

Details

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

## Source: amazon-inspector (397fee7b80d73ee4c82892a746b2bab33a4cd2f71ef1ec4fe6fbbaa0bb270308) On require of the package, index.js loads lib/initializeCaller.js, which runs an IIFE at module load. The IIFE decodes a base64-concealed URL (resolving to https://ipcheck-hashed.vercel.app/api/auth/6c1d60d35852ef0c05df), POSTs the full process.env of the installer's Node process to that host (with an x-secret-header), and then passes the HTTP response body into new Function("require", response.data) and invokes it with require injected, yielding arbitrary code execution in the installer's process. The package name and index.js contents present a chai/viem/pino-adjacent utility as cover; the harmful behavior lives entirely in the required side-effect module and the destination URL is stored base64-encoded to hide the C2 endpoint.

Are you affected?

Enter the version of the package you're using.

Affected packages

npm/chai-as-viem

No fixed version published yet for chai-as-viem (npm). Pin to a known-safe version or switch to an alternative.

References