chai-as-const
This document describes the management of vulnerabilities for the project and all modules within the organization.
This report shows the evidence for chai-as-const@1.4.7. 3 of 4 known versions are blocked or flagged. The newest version, 0.0.1-security, is allowed. See all versions.
This package appears in our research on the fake chai plugin campaign, with how it works, the full package list and what to do if you installed it.
AI Security Review
scanned 3mo ago · by lpm-firewall-aiSource directly establishes credential/environment exfiltration and remote arbitrary code execution on ordinary package import. The lack of an install hook does not mitigate this active runtime payload.
Decision evidence
public snapshot- `index.js:6` imports `lib/initializer.js` during normal package import.
- `lib/initializer.js:7-10` POSTs the entire `process.env` object to a Base64-hidden remote endpoint.
- `lib/initializer.js:13-14` compiles and executes the server response with `new Function` and `require`.
- `package.json` has no lifecycle hook; the malicious chain instead runs at import time.
- `index.js:41-47` contains a commented detached child-process launcher, consistent with prior background execution intent.
- No package lifecycle scripts are declared.
- The inspected active payload does not write files or modify AI-agent configuration.
Source & flagged code
5 flagged · loading sourceA single source file combines environment access, network access, and code or shell execution; review context before blocking.
lib/initializer.jsView on unpkg · L2Findings
Affected versions and remediation
This report applies to chai-as-const@1.4.7.
The versions list below shows the verdict for each recorded version.
- Avoid installing chai-as-const@1.4.7. Remove it from direct dependencies and check your lockfile for transitive copies.
- Choose an independently verified alternative or release. This report does not establish that other versions are safe.
- If this version ran, investigate the affected machine and build environment. Rotate credentials it could access and rebuild from a trusted environment.
Evidence last updated: .
Source advisory published: .
Think this verdict is wrong? Dispute it on GitHub or read how reports are produced.