# Phished npm token led to malware in eslint-config-prettier, eslint-plugin-prettier and synckit

Source: https://botpassword.com/incidents/2025-07-eslint-config-prettier-phishing
Disclosed: 2025-07-18 · Type: Supply chain · Status: Resolved · Updated: 2026-10-25

On 18 July 2025 a phishing email from the typosquatted domain `npnjs.com` obtained a maintainer's npm token, and the attacker used it to publish malicious versions of `eslint-config-prettier`, `eslint-plugin-prettier`, `synckit`, `@pkgr/core` and `napi-postinstall` straight to npm, with no matching commits on GitHub. On Windows the install script loaded a DLL (`node-gyp.dll`) with `rundll32`. If a Windows machine or CI runner installed an affected version, treat it as compromised and rotate its credentials.

Identifiers: CVE-2025-54313

## What was exposed

Two sets of credentials. First, the **maintainer's npm token**, captured by a lookalike npm site and used to publish without touching the GitHub repositories, which is why the releases lacked the npm provenance earlier versions had. Second, anything on **Windows machines** that installed an affected version: the install script ran `rundll32` on a bundled `node-gyp.dll`, giving the attacker code execution. A commenter on the maintainer's issue identified the DLL as the "Scavenger" information stealer, which targets browser data; that identification is a third-party claim. Code execution on a developer workstation or Windows CI runner exposes saved browser passwords and sessions, npm and GitHub tokens and cloud credentials.

## Who is affected

You are affected if a **Windows** machine or runner installed any of these versions on or after 18 July 2025: `eslint-config-prettier` 8.10.1, 9.1.1, 10.1.6 or 10.1.7; `eslint-plugin-prettier` 4.2.2 or 4.2.3; `synckit` 0.11.9; `@pkgr/core` 0.2.8; `napi-postinstall` 0.3.1. These are development dependencies, so look in lockfiles rather than production bundles. Because `eslint-config-prettier` is pulled in by many lint presets, also check transitive dependencies. The payload targeted Windows; the sources do not describe any effect on macOS or Linux installs.

## What to do

1. Search lockfiles for the versions above and upgrade to clean releases; clear package-manager caches and remove the versions from internal mirrors.
2. On Windows machines that installed them: look for `node-gyp.dll` in the package folder, run an endpoint scan, and reimage if the DLL ran.
3. From a clean device, rotate credentials the Windows machine held, including browser-saved passwords and sessions, npm and GitHub tokens, and cloud keys.
4. If you maintain packages: never sign in through a link in an email, use phishing-resistant 2FA, and publish through trusted publishing so releases carry provenance.

## Keys to rotate

- [npm](https://botpassword.com/keys/npm)
- [GitHub](https://botpassword.com/keys/github)

## Timeline

- 2025-07-18: Users notice malicious code in the diff from `eslint-config-prettier` 10.1.5 to 10.1.7. The maintainer says the token came from a phishing email, deletes it and starts deprecating the versions. ([source](https://github.com/prettier/eslint-config-prettier/issues/339))
- 2025-07-19: Socket publishes the full list of affected packages and ties the compromise to a phishing campaign using `npnjs.com`. ([source](https://socket.dev/blog/npm-phishing-campaign-leads-to-prettier-tooling-packages-compromise))
- 2025-07-19: CVE-2025-54313 is published for `eslint-config-prettier` 8.10.1, 9.1.1, 10.1.6 and 10.1.7. ([source](https://nvd.nist.gov/vuln/detail/CVE-2025-54313))
- 2026-01-22: NVD records that CISA added CVE-2025-54313 to its Known Exploited Vulnerabilities catalog. ([source](https://nvd.nist.gov/vuln/detail/CVE-2025-54313))

## Indicators

- Phishing domain `npnjs.com`.
- A file `node-gyp.dll` in an affected package, loaded through `rundll32` from an install script.
- Releases of the affected packages without npm provenance and without matching commits in the GitHub repository.

## Sources

- https://github.com/prettier/eslint-config-prettier/issues/339
- https://socket.dev/blog/npm-phishing-campaign-leads-to-prettier-tooling-packages-compromise
- https://nvd.nist.gov/vuln/detail/CVE-2025-54313
