chai-as-persisted has 2 compromised versions.

HighAdvisory sweepnpm

chai-as-persisted has 2 versions on the npm registry flagged in 2 incidents we track. Only the exact versions listed below were named by the source advisories. chai-as-persisted was recorded in a daily advisory sweep. The write-up groups it into a cluster with the evidence available at the time; check the cluster note before treating it as a confirmed compromise.

At a glancenpm
2
Compromised versionsDo not install these

If one is in your tree, treat the machine as compromised, not just out of date.

Ecosystem
npm
Worst severity
High
Incidents
2
First flagged
27 Jun 2026
Last flagged
30 Jun 2026
Type
Advisory sweep

Version data comes from the public advisories cited on each incident page.

Affected versions

The exact releases to look for.

Check what you actually have installed with npm ls chai-as-persisted.

  • chai-as-persisted@6.1.9
  • chai-as-persisted@4.2.8
The incidents

The 2 incidents that flagged it

HighAdvisory sweep

GitHub Advisory npm malware sweep, 30 June 2026

On 2026-06-30 GitHub's Advisory Database dropped a coordinated batch of ~25 CWE-506 Embedded Malicious Code advisories against unrelated npm packages published between 2026-05-27 and 2026-06-30. The batch mixes at least four distinct sub-clusters: chai-as-persisted / chai-as-assured (Chai typosquats), brock-loader / brock-react-alerts (with a 9999.0.0 dep-confusion tag), the rebrandly-domains-* pair (both 9999.0.0), and a wider fan-out of standalone malicious names.

Versions named here: 4.2.8, 6.1.9Read the incident →
HighTyposquat

jsonspack campaign returns with chai-as-persisted and chai-as-assured typosquats

On 2026-06-26 → 2026-06-28 the same DPRK-linked operator behind the March jsonspack npm campaign restarted with chai-as-persisted and chai-as-assured - typosquats of chai-as-promised that ship install-time RCE droppers. Four versions across the two packages were published with the same hello@jsonspack.com author bug URL, fetching attacker JavaScript from ipregionchecker.org via new Function.constructor on every npm install.

Versions named here: 4.2.8, 6.1.9Read the incident →
What to do

Installed one of these? Start here.

Treat the machine as compromisedUpgrading is not enough. Packages in these incidents typically execute at install time, so the payload has already run with whatever credentials were in the environment.

  1. Rotate every credential that machine or CI job could reach, such as registry tokens, cloud keys, SSH keys and CI secrets, from a different machine.
  2. Pin to a version not listed above, then reinstall from a clean lockfile.
  3. Clear caches and private mirrors. Artifactory, Nexus, Verdaccio and devpi routinely keep serving a tarball after the public registry has pulled it.
  4. Read the incident write-up. Recommended actions differ per incident, and some have specific indicators of compromise worth searching your logs for.

Version data comes from the public advisories cited on each incident page. We list only versions those advisories name and do not infer additional ones. Think this is wrong or incomplete? Tell us.

Check your whole project

Check every dependency, not just this one.

It is usually pulled in as a transitive dependency rather than one you installed directly. Paste your package-lock.json to check every dependency at once. It runs in your browser and nothing is uploaded.