npm

The eslint-config-prettier npm Supply Chain Attack

Updated 5 Oct 2026 · Incident date 18 Jul 2025

eslint-config-prettier 8.10.1, 9.1.1, 10.1.6 and 10.1.7 on npm ran an install script that started a hidden Windows DLL on 18 July 2025.

The issue has the identifier CVE-2025-54313. A phishing email gave the attackers a maintainer's npm token, and they also published bad versions of four related packages.

What happened

A phishing email tricked a maintainer, and the attackers used the stolen npm token to publish bad releases.

  • The attackers collected credentials on a look-alike domain.
  • The bad versions added install.js and an install hook to a config-only package.
  • On Windows, the code runs node-gyp.dll through rundll32.
  • Snyk says the DLL holds a known trojan.
  • The code does nothing on other systems.

The attackers published the bad versions on 18 July 2025.

Affected versions

Socket lists these bad versions.

  • eslint-config-prettier 8.10.1, 9.1.1, 10.1.6 and 10.1.7.
  • eslint-plugin-prettier 4.2.2 and 4.2.3.
  • synckit 0.11.9.
  • @pkgr/core 0.2.8.
  • napi-postinstall 0.3.1.
  • StepSecurity also lists is 3.3.1 and 5.0.0, and got-fetch 5.1.11 and 5.1.12.
  • Fixed versions of eslint-config-prettier: 8.10.2, 9.1.2 and 10.1.8 or higher. Socket says 10.1.5 and earlier are safe.

Indicators of compromise

  • Phishing domain: npnjs.com.
  • A new install.js file in the package, with an install lifecycle hook in package.json.
  • A reference to node-gyp.dll and rundll32.
  • A crashreporter.dll file in the got-fetch variant, which installed the stealer Pycoon.
  • Package versions on npm with no matching commit in the GitHub repository.
  • CVE-2025-54313 for eslint-config-prettier.

How to check

List the installed versions of all five packages and look for an install script in the config package. A hit on the second command is a finding.

npm ls --all eslint-config-prettier eslint-plugin-prettier synckit @pkgr/core napi-postinstall
find node_modules -path '*eslint-config-prettier/install.js'
grep -n 'node-gyp.dll' -r node_modules/eslint-config-prettier

What to do now

  1. Pin eslint-config-prettier to a fixed version. Pin the other four packages away from the bad versions.
  2. Delete node_modules, clear the npm cache and reinstall from a clean lockfile.
  3. If a Windows machine or build ran a bad install, treat it as compromised and rotate its credentials.
  4. Check CI logs and dependency bot pull requests from 18 July 2025.

What Vigilance would show

These examples show an install hold and the corresponding owner report.

Example install message

Vigilance blocked `eslint-config-prettier` 8.10.0. This version is too new or changed in a way Vigilance must check first.

Example owner report

Bad update

eslint-config-prettier 8.10.0

A code-formatting settings package gained an install step that dropped and ran a hidden Windows program.

See what to do now.

No security team? See who reads the alert.

Frequently asked questions

Which eslint-config-prettier versions were compromised?

Versions 8.10.1, 9.1.1, 10.1.6 and 10.1.7. Fixed versions are 8.10.2, 9.1.2 and 10.1.8 or higher.

What did the compromised eslint-config-prettier do?

The bad versions added an install script that runs node-gyp.dll through rundll32 on Windows.

What is CVE-2025-54313?

It is the identifier for the eslint-config-prettier compromise.

Sources

  1. socket.dev/blog/npm-phishing-campaign-leads-to-prettier-tooling-packages-compromise
  2. stepsecurity.io/blog/supply-chain-security-alert-eslint-config-prettier-package-shows-signs-of-compromise
  3. security.snyk.io/vuln/SNYK-JS-ESLINTCONFIGPRETTIER-10873299

Send this page to the person who looks after AI at your company.

Email it

More supply chain attacks

All 172 attacks in the library · npm supply chain attacks · How to prevent supply chain attacks

Check the next update before you install it

Vigilance compares the version you trust with the new one. It names the one file that gained a power the old version did not have.

Start the free 14-day trialBrowse the attack library