VYPR

npm · Malicious package advisory

Malware

chai-as-relay

GHSA-mq79-xj84-m775

Malicious code in chai-as-relay (npm)

Details

**Severity:** Critical

**Affected versions:** `= 1.2.1`

## Source: amazon-inspector (5c65319b0e17f945fc57f482eb174e5d7fe70e63a380cb24f64eea1808bdad2f)
Package main index.js unconditionally requires./lib/config at module load. lib/config.js is a single-line ~4.4MB obfuscator.io-packed IIFE (hex-escaped string-array of 26,102 entries, rotated with wrapper decoders, control-flow flattening, ~133k transform changes) that self-invokes at top level. Any consumer that `require('chai-as-relay')` executes this opaque bundle in-process. The remainder of the tarball (README, LICENSE, index.d.ts, lib/proto, etc.) is copied verbatim from the legitimate `pino` logger project, and index.js additionally exports a no-op Express-style middleware — the package's advertised identity is a cover for the dropper. The package.json name (`chai-as-relay`) and author ([email protected]) have no relationship to pino or its maintainers. A heavily obfuscated, multi-megabyte, self-executing blob wired into the require entry of a package that impersonates a top-tier logger has no legitimate purpose and gives whoever controls the payload arbitrary code execution on every installer that imports the package.

---

Credit: [OpenSSF](https://github.com/ossf/malicious-packages) ([source](https://github.com/ossf/malicious-packages/blob/673f2310ffc87df8cd80340bf43293eed5837dac/osv/malicious/npm/chai-as-relay/MAL-2026-17189.json))

**References:**
- https://github.com/ossf/malicious-packages/blob/673f2310ffc87df8cd80340bf43293eed5837dac/osv/malicious/npm/chai-as-relay/MAL-2026-17189.json
- https://www.npmjs.com/package/chai-as-relay/v/1.2.1
- https://github.com/advisories/GHSA-mq79-xj84-m775

Compromised versions (1)

  • = 1.2.1

Any computer that installed or ran a compromised version should be considered fully compromised. Rotate every secret on that machine from a clean environment.