Supply chain · July 18, 2025

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

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.

DisclosedJuly 18, 2025
Earliest known activityJuly 18, 2025
Affectedeslint-config-prettier, eslint-plugin-prettier, synckit, @pkgr/core, napi-postinstall, npm
TypeSupply chain
StatusResolved
CVECVE-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.

Am I 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 now

  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

Guides to the credentials this incident put at risk:

Timeline

  1. 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
  2. Socket publishes the full list of affected packages and ties the compromise to a phishing campaign using npnjs.com. Source
  3. CVE-2025-54313 is published for eslint-config-prettier 8.10.1, 9.1.1, 10.1.6 and 10.1.7. Source
  4. NVD records that CISA added CVE-2025-54313 to its Known Exploited Vulnerabilities catalog. Source

Indicators

From the advisories listed below. Use them to search your logs, lockfiles and workflow runs.

  • 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.

What this changes for credential handling

  • A password manager that fills only on the saved domain would not have offered the npm login on npnjs.com. BotPassword fills credentials only on the exact domain they belong to.

Frequently asked questions

Am I affected by the eslint-config-prettier incident?

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 was exposed in the eslint-config-prettier incident?

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.

Which keys should I rotate?

Rotate any npm, GitHub credentials that were reachable from affected systems, starting with the ones that can publish code or reach production.

Keep keys out of reach of the next compromised package

BotPassword is in early access. Request an invite and we'll email you when your spot opens.