Critical (AgentArmorHQ estimate)Supply chain

Malicious code in chai-as-viem (npm)

Product
chai-as-viem
Affected
chai-as-viem 1.1.3
Fixed in
No fix yet

Last verified against sources: October 26, 2026

Am I affected?

chai-as-viem: affected chai-as-viem 1.1.3. No fix has been reported yet.

  • Check your version: run npm ls chai-as-viem. Versions = 1.1.3 of chai-as-viem are affected. [1]

What to do now

  1. Remove the package if it is installed: run npm uninstall chai-as-viem. [1]
  2. No fixed version is available for npm/chai-as-viem 1.1.3. [1]

General practice, not from the source: if the affected software could read tokens or credentials, rotate them after upgrading; pin versions and review changes before updating tools your agents run.

Discuss this incident

What happened

  • On require of the package, index.js loads lib/initializeCaller.js, which runs an IIFE at module load. [1]
  • The IIFE decodes a base64-concealed URL (resolving to https://ipcheck-hashed.vercel.app/api/auth/6c1d60d35852ef0c05df). [1]
  • The harmful behavior lives entirely in the required side-effect module. [1]
  • The package name and index.js contents present a chai/viem/pino-adjacent utility as cover. [1]

Impact

  • The IIFE POSTs the full process.env of the installer's Node process to that host (with an x-secret-header). [1]
  • The HTTP response body is passed into new Function("require", response.data) and invoked with require injected, yielding arbitrary code execution in the installer's process. [1]

What was done

  • The GitHub Advisory Database lists malicious code in chai-as-viem (npm). [1]

Sources

  1. GHSA-c67f-wr24-prw9 — GitHub Advisory Database

Every statement above was checked against these sources before publishing. Spotted an error? Tell us and we will correct it with a dated note.

Share advisory brief with your team

Copy a plain-text summary for Slack, GitHub issues, or team security channels.

Brief
Malicious code in chai-as-viem (npm)
Product: chai-as-viem | Affected: chai-as-viem 1.1.3 | Fixed in: No fix yet
Summary: On require of the package, index.js loads lib/initializeCaller.js, which runs an IIFE at module load.
Source & remediation on AgentArmorHQ: https://agentarmorhq.com/incidents/2026/09/ghsa-c67f-wr24-prw9-chai-as-viem
Was this page useful?

Corrections

Report an error or request a correction. We review requests within 5 business days and add a dated correction note.

10 to 2,000 characters. A link to a source helps. Stored as plain text.

Discussions for chai-as-viem

Ask questions or share configuration tips. Governed by our Community Rules & Terms.

No posts match this filter yet.

Be the first to ask a question or share a working tip.

Check before you install

Paste a package name or a GitHub link and get a clear answer in seconds: Block, Review or No known issues. No account needed.

Check a package

Questions? Contact us