rotateit

All incidents

eslint-config-prettier and related npm packages hijacked through a phished npm token

Disclosed Jul 19, 2025 · updated Oct 28, 2026 · high · Historical

Hijacked eslint-config-prettier versions dropped an infostealer on Windows.

Are you affected?

The free scanner that answers this opens soon. Until then, the steps below work by hand.

What happened

A phished npm token shipped malware in Prettier tools. Socket and BleepingComputer say the maintainer of eslint-config-prettier received a phishing email spoofing npm support that linked to the lookalike domain npnjs.com, and the attacker used his stolen npm token to publish malicious versions of eslint-config-prettier, eslint-plugin-prettier, synckit, @pkgr/core and napi-postinstall with no matching GitHub commits. GitHub's advisory for CVE-2025-54313 says installing an affected version runs install.js, which launches node-gyp.dll on Windows. Socket, summarising a reverse-engineering report on 2025-07-22, says the DLL loads an infostealer named Scavenger that focuses on browser data, including cached session data, and describes symptoms consistent with scraping browser credentials and credential files such as .npmrc and .netrc. The maintainer revoked the token and deprecated the versions.

Exposure starts
2025-07-18
Exposure ends
Not known yet (no source says when the malicious versions were removed from npm)
Confidence
medium
Scope
every credential stored on a Windows machine or CI runner that installed an affected version, including browser-saved credentials and sessions and the files .npmrc and .netrc

What to do, in this order

  1. Check lockfiles for the affected versions, remove them, delete node_modules and clear the npm cache

    Socket's first step; a cached copy reinstalls the payload.

  2. npm tokens stored in .npmrc on affected Windows machines and runners

    Socket's summary names .npmrc among the credential files the malware scrapes; a stolen npm token is how this attack started.

    npm_token

  3. Sign out of browser sessions and change passwords saved in browsers on affected Windows machines, then credentials in .netrc

    Advisory inference from Socket's summary that the malware targets browser data, cached session data, browser credentials and .netrc.

    anything else stored there

  4. Rotate other secrets that affected CI builds could read

    BleepingComputer advises considering rotation of secrets exposed in builds deployed after 2025-07-18.

    anything else stored there

  5. Turn on two-factor authentication for npm and check sender domains on npm emails

    Socket recommends npm 2FA; the token was stolen through a lookalike npm domain.

Notes

  • GitHub's advisory, Socket and BleepingComputer all describe the DLL being launched on Windows only. Fixed releases are 8.10.2, 9.1.2 and 10.1.8 of eslint-config-prettier, 4.2.4 of eslint-plugin-prettier, 0.11.10 of synckit, 0.2.9 of @pkgr/core and 0.3.2 of napi-postinstall (OSV).
  • The start date is BleepingComputer's "after July 18" for affected builds; no source gives the first malicious publish time.
  • Advisory inference: BleepingComputer suggests considering rotating secrets exposed in affected builds; the credential list in this entry follows the Scavenger behaviour Socket summarises, not a vendor rotation checklist.

How to tell if you’re affected

  • eslint-config-prettier 8.10.1, 9.1.1, 10.1.6 or 10.1.7 in a lockfile
  • eslint-plugin-prettier 4.2.2 or 4.2.3, synckit 0.11.9, @pkgr/core 0.2.8 or napi-postinstall 0.3.1 in a lockfile
  • A file node-gyp.dll in an installed package, loaded through rundll32 by install.js
  • Email links to the lookalike domain npnjs.com

Sources

Rotating the keys

Pro, $49 a year when it opens, plans the rotation of each affected key for this incident, in this order. Automatic rotation is in testing and included.

One email when it opens. Stored: your email, whether you confirmed, and when you signed up. We send a confirmation link first.

By hand, free: the steps above.