Skip to content
supplychainattack.orgSupply chain attack incident catalog
containedcritical

Malicious code in chai-as-deployer (npm)

The npm package chai-as-deployer contains malicious obfuscated code that executes unconditionally at import time. The package impersonates a chai plugin but delivers a ~3.5MB obfuscated bundle capable of spawning child processes and making outbound HTTP requests, consistent with a stealer/loader payload.

ShareXLinkedInHacker News
Disclosed
Last updated
Blast radius
Any npm consumer importing chai-as-deployer; payload executes unconditionally at import time.
Ecosystems
Attack vectors
Affected entities
  • chai-as-deployernpm package containing malicious obfuscated code

The npm package chai-as-deployer was published with malicious intent. While advertised as a chai plugin, the package's actual functionality is a no-op Express middleware. The real payload is loaded unconditionally at module top level via require('./lib/config'), which loads a heavily obfuscated ~3.5MB bundle using obfuscator.io-style techniques (rotated string arrays, decoder functions, hex-escaped identifiers).

The obfuscated code contains tokens for require, exec, spawn, and axios, indicating the decoded payload drives child-process execution and outbound HTTP requests. This is the canonical pattern of an import-time stealer or loader malware.

The package uses social engineering to disguise its true nature: the tarball contains verbatim pino README/docs/type-definitions (impersonation), generic author metadata (Harrison Thorn), and an unrelated boilerplate description. Any consumer that imports chai-as-deployer triggers the payload with no further user action required.

The malicious package was identified by the OpenSSF's malicious-packages project and assigned identifier MAL-2026-13700.

Indicators of compromise

Packages
  • chai-as-deployer

Remediation

  • Immediately remove chai-as-deployer from all dependencies and lock files
  • Audit all projects that imported chai-as-deployer for signs of compromise (unexpected network connections, child processes, credential theft)
  • Review npm audit logs and package.json history to identify when chai-as-deployer was added
  • If chai-as-deployer was installed in production or CI/CD environments, assume those systems may be compromised and perform forensic analysis
  • Use npm audit to check for other malicious packages and consider enabling 2FA on npm accounts
  • Monitor for legitimate chai plugin alternatives and update to a trusted replacement

Sources

  1. GitHub Advisory GHSA-7qqp-m577-rp2w · GitHub Advisory Database

Cite this entry

"Malicious code in chai-as-deployer (npm)." supplychainattack.org, Supply Chain Attack Incident Catalog. Disclosed August 10, 2026; last updated August 10, 2026. https://supplychainattack.org/incident/malicious-code-in-chai-as-deployer-npm-k9hzq3

Suggest a correction

Found an error or have a newer source? Corrections to factual errors take priority over new entries.

  1. resolvedcritical

    Malicious code in akamai-sensor (npm)

    A malicious npm package named akamai-sensor impersonated Akamai's legitimate sensor_data anti-bot SDK. The package contained hidden JavaScript code concealed using invisible Unicode characters and implemented a dynamic command-and-control channel via a Google Calendar dead-drop, enabling arbitrary code execution on installation.

    npmCompromised packageTyposquatting
  2. resolvedcritical

    Malicious code in depcruise-wrap-stream-in-html (npm)

    depcruise-wrap-stream-in-html@99.9.1 is a malicious npm package that mimics an internal helper of dependency-cruiser. It is a hollow package that downloads and executes arbitrary code from a Google Cloud Storage bucket during installation.

    npmCompromised packageDependency confusionTyposquatting
  3. resolvedcritical

    Malicious code in @finaxis/common-js (npm)

    The npm package @finaxis/common-js was published with a README and keywords copied from lodash v4.18.1, but contained a heavily obfuscated Xelis (XEL) proof-of-work cryptominer instead of lodash functionality. Consumers installing this package would unknowingly run a covert CPU/GPU miner on their systems.

    npmCompromised packageTyposquatting
  4. resolvedcritical

    Malicious code in wct-st (npm)

    The npm package wct-st contained malicious code in its postinstall lifecycle script that collected and exfiltrated host identifiers to a remote endpoint. The package name resembles the deprecated web-component-tester, consistent with a typosquatting attack.

    npmCompromised packageTyposquatting