Advisory

MAL-2026-3753

Also known as: None

Malicious package Its source marks this package as malicious: it is not a vulnerability in a legitimate one.

Summary

Malicious code in chai-as-regulated (npm)

Details

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

Source: amazon-inspector (67f7f8d21f5d33db136b1e10fc7fbb6d2a1540240911b0630e7fc9f8724c7b26)
Package is published as chai-as-regulated, a name mimicking the widely-used chai-as-promised Chai plugin, and the README instructs users to register it via chai.use(chaiAsRegulated). The shipped code, however, does not implement a Chai plugin: the tarball contains Pino logger source files (lib/levels.js, lib/proto.js, lib/tools.js, lib/transport.js, docs referencing pinojs/pino), and the package.json description is unrelated boilerplate ("This document describes the management of vulnerabilities for the project and all modules within the organization."). The exported middleware in index.js (lines 32-50) calls runBackgroundTask, which uses child_process.spawn('node', [scriptPath, JSON.stringify(args)], { detached: true, stdio: 'ignore' }) followed by child.unref() to silently launch ./lib/initializeCaller.js as a detached background process passing caller-supplied arguments. The referenced initializeCaller.js is absent from this tarball, so no payload executes today, but the loader shape (typosquat name + identity lie + detached orphan-process spawner pointing at a sibling file) is structured for a future-version payload swap. The combination of name confusion against a popular target, copied unrelated source used as cover, and a silent background-launcher wired into the advertised API exceeds the bar for typosquat-with-payload-shape.

Severity

Not rated by the source.

Dates

Published
2026-05-14 19:25 UTC
Modified
2026-05-15 07:52 UTC

Affected packages and fixes

chai-as-regulated

npm · All systems

Affected

  • Versions: 2.0.12

Fixed versions

None listed

Fix

No fixed version is listed.

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: OpenSSF Malicious Packages · Apache-2.0

Sources & licences