chai-as-relay
This document describes the management of vulnerabilities for the project and all modules within the organization.
This report shows the evidence for chai-as-relay@1.2.1, the only known version.
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 26d ago · by lpm-firewall-aiThe published main module immediately runs an obfuscated payload that loads shell execution, filesystem access, and an HTTP client. That is hidden import-time attack behavior, not a logger feature.
Decision evidence
public snapshot- package.json sets main to index.js for chai-as-relay 1.2.1 and defines only smoke scripts, with no install lifecycle hooks.
- index.js loads child_process and requires ./lib/config as soon as the module is imported.
- lib/config.js is a single-line obfuscated function that executes when that module is loaded.
- Inside that payload the code requires os, fs, and child_process execSync plus spawn.
- The same payload also requires axios and the crypto module.
- No preinstall, install, or postinstall script is declared in package.json.
- The exported middleware function only calls next and does not itself send data.
Source & flagged code
7 flagged · loading sourceindex.js loads child_process and requires ./lib/config as soon as the module is imported.
index.jsView on unpkg · L3Source downloads or fetches remote code and executes it.
lib/config.jsView on unpkg · L1Findings
Affected versions and remediation
This report applies to chai-as-relay@1.2.1.
The versions list below shows the verdict for each recorded version.
- Avoid installing chai-as-relay@1.2.1. 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.