Supply chain · npm · High

Critical npm Package 'chai-as-persisted' Compromises Host Systems

Threat Engine Auto-Feed · data current as of 2026-07-01

The npm package 'chai-as-persisted' has been identified as malicious, leading to full system compromise upon installation. All secrets and keys on affected systems must be rotated immediately, and the package removed, though full remediation may require further steps due to potential persistent compromise.

  • Package: npm / chai-as-persisted
  • Affected versions: >= 0
  • Severity: critical
  • Reach: ~445/wk
  • Exposure: 70/100 (High)

What happened — Credential / secret theft

The 'chai-as-persisted' npm package contains malware. Installation or execution of this package results in the complete compromise of the host computer, granting an external entity full control.

How the attack works

This is a malicious package attack where a seemingly legitimate software component introduces harmful code into a development or production environment. Upon installation, the malicious code executes, establishing unauthorized access and control over the compromised system.

Who's exposed

Profiles most at risk

  • Development teams using the npm ecosystem
  • Organizations with CI/CD pipelines that pull unpinned or latest versions of dependencies
  • Any user or system that has installed 'chai-as-persisted' into their environment

Conditions that increase exposure

  • Unpinned dependencies in package.json allowing for the installation of any version
  • Lack of package-lock.json or yarn.lock files to ensure consistent dependency versions
  • Use of internal package mirrors that may not filter out malicious packages

Blast-radius scenarios

  • An attacker gains full control over the compromised computer, potentially accessing sensitive data, credentials, and internal networks.
  • All secrets and keys stored on the compromised machine are exposed and can be exfiltrated.
  • The compromised system could be used as a pivot point for further attacks within the organization's infrastructure.

What to do (defensive)

Detect

  • Scan dependency trees for 'chai-as-persisted' (any version).
  • Monitor network traffic for unusual outbound connections from systems that installed npm packages.
  • Review system logs for unexpected process execution or file modifications post-package installation.

Contain

  • Immediately isolate any system identified with 'chai-as-persisted' installed.
  • Block network access for compromised systems to prevent further exfiltration or lateral movement.
  • Suspend any CI/CD pipelines that may be pulling this package.

Remediate

  • Consider any computer with 'chai-as-persisted' installed as fully compromised and rebuild from a trusted image.
  • Rotate all secrets and keys (e.g., API tokens, SSH keys, cloud credentials) that were stored on or accessible from the compromised computer, using a different, trusted system.
  • Remove the 'chai-as-persisted' package from all environments; however, be aware that this alone may not remove all malicious software.

Frontier verdict — High

Prioritize immediate investigation and remediation for any system found with 'chai-as-persisted' due to critical system compromise risk.

Sources

For detection-engineering and awareness only · point-in-time · not security advice · sourced from the GitHub Advisory Database.