# CVE-2025-54313: Prettier eslint-config-prettier Embedded Malicious Code

> Malicious code in eslint-config-prettier executes malware during installation on Windows, requiring users to upgrade to a safe version.

- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:H/A:N`)
- **Exploited in the wild:** Yes, since 22 Jan 2026 (CISA KEV)
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 19 Jul 2025
- **Updated:** 26 Feb 2026
- **Also known as:** GHSA-f29h-pxvx-f335

## What is CVE-2025-54313?

CVE-2025-54313 is a high-severity vulnerability in eslint-config-prettier, published on 19 Jul 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

eslint-config-prettier 8.10.1, 9.1.1, 10.1.6, and 10.1.7 has embedded malicious code for a supply chain compromise. Installing an affected package executes an install.js file that launches the node-gyp.dll malware on Windows.

Weakness: CWE-506 (Embedded Malicious Code)

## Which versions are affected by CVE-2025-54313?

16 open source packages ship an affected version, including eslint-config-prettier, @pkgr/core and eslint-plugin-prettier. It affects 7 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `eslint-config-prettier` | npm | From 10.1.6 | 10.1.8 |
| `eslint-config-prettier` | npm | From 10.1.6 | 10.1.8 |
| `eslint-config-prettier` | npm | From 8.10.1 | 8.10.2 |
| `eslint-config-prettier` | npm | From 8.10.1 | 8.10.2 |
| `eslint-config-prettier` | npm | From 9.1.1 | 9.1.2 |
| `eslint-config-prettier` | npm | From 9.1.1 | 9.1.2 |
| `@pkgr/core` | npm | From 0.2.8 | 0.2.9 |
| `@pkgr/core` | npm | From 0.2.8 | 0.2.9 |
| `eslint-plugin-prettier` | npm | From 4.2.2 | 4.2.4 |
| `eslint-plugin-prettier` | npm | From 4.2.2 | 4.2.4 |
| `got-fetch` | npm | From 5.1.11 | 6.0.0 |
| `got-fetch` | npm | From 5.1.11 | 6.0.0 |
| `napi-postinstall` | npm | From 0.3.1 | 0.3.2 |
| `napi-postinstall` | npm | From 0.3.1 | 0.3.2 |
| `synckit` | npm | From 0.11.9 | 0.11.10 |
| `synckit` | npm | From 0.11.9 | 0.11.10 |

Products: Alexghr Got-Fetch, Homarr Homarr, Prettier Eslint-Config-Prettier, Prettier Eslint-Plugin-Prettier, Un-Ts Napi-Postinstall, Un-Ts Pkgr\/Core, Un-Ts Synckit.

## How do I fix CVE-2025-54313?

Upgrade eslint-config-prettier to a fixed version for your release line: 10.1.8, 8.10.2 or 9.1.2. US federal agencies must fix it by 12 Feb 2026.

## Is CVE-2025-54313 being exploited?

Yes. Attackers have exploited CVE-2025-54313 in the wild since at least 22 Jan 2026.

Public exploit code:

- Checks projects for compromised packages, suspicious files, and import statements. (github_poc): https://github.com/nihilor/cve-2025-54313
- Detect CVE-2025-54313 eslint-config-prettier supply chain attack IOCs on Windows (github_poc): https://github.com/Paspke/scavenger_scanner

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-54313 and fix it if it is affected.

What it is: CVE-2025-54313 is a high-severity vulnerability in eslint-config-prettier, published on 19 Jul 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: Yes. Attackers have exploited CVE-2025-54313 in the wild since at least 22 Jan 2026.

Affected packages and fixed versions:
- eslint-config-prettier (npm): affected from 10.1.6; fixed in 10.1.8
- eslint-config-prettier (npm): affected from 10.1.6; fixed in 10.1.8
- eslint-config-prettier (npm): affected from 8.10.1; fixed in 8.10.2
- eslint-config-prettier (npm): affected from 8.10.1; fixed in 8.10.2
- eslint-config-prettier (npm): affected from 9.1.1; fixed in 9.1.2
- eslint-config-prettier (npm): affected from 9.1.1; fixed in 9.1.2
- @pkgr/core (npm): affected from 0.2.8; fixed in 0.2.9
- @pkgr/core (npm): affected from 0.2.8; fixed in 0.2.9
- eslint-plugin-prettier (npm): affected from 4.2.2; fixed in 4.2.4
- eslint-plugin-prettier (npm): affected from 4.2.2; fixed in 4.2.4
- got-fetch (npm): affected from 5.1.11; fixed in 6.0.0
- got-fetch (npm): affected from 5.1.11; fixed in 6.0.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-54313/ (Markdown: https://insights.sbomify.com/CVE-2025-54313/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-54313
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-54313
- OSV: https://osv.dev/vulnerability/CVE-2025-54313

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-54313/
Summaries are generated and may contain mistakes; the official description above is the record.
