How to Fix CVE-2025-54313: Embedded Malicious Code in Prettier eslint-config-prettier
By Sai Kiran Pandrala
| Severity | CVSS 7.5 (High) |
|---|---|
| Actively exploited? | Yes, listed in CISA KEV (added 2026-01-22, federal due date 2026-02-12) |
| Affected | eslint-config-prettier: 8.10.1, 9.1.1, 10.1.6, 10.1.7 |
| Fixed in | See vendor advisory for the patched build for your version |
| Type (CWE) | CWE-506 — Embedded Malicious Code |
What is CVE-2025-54313?
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.
A successful exploit gives the attacker the impact described in the vendor advisory. The fix is to install the patched build from Prettier listed in the table above and confirm the running version after the upgrade.
Am I affected?
Check your installed version of Prettier eslint-config-prettier against the Affected row above. If your build sits within any of those ranges, treat the system as vulnerable until patched.
If you do not have the version handy, pull it the same way you usually would for eslint-config-prettier: the management console's About page, the CLI's version command, or the package manager record for the installed binary. The vendor advisory linked in the references section is the authoritative source.
How to fix CVE-2025-54313
- Read the vendor advisory at https://socket.dev/blog/npm-phishing-campaign-leads-to-prettier-tooling-packages-compromise for the build matrix that matches your installation.
- Identify the patched build for your major version from the advisory's downloads section.
- Back up configuration before upgrading (export running config, snapshot the VM, or take a database dump as appropriate for your platform).
- Apply the patched build using the vendor's documented upgrade path (in-place upgrade, package update, or replacement image).
- Restart the service so the new code is loaded; verify the running version reports the patched build number.
Apply the Microsoft security update
# The exact KB number is listed in the Microsoft advisory: https://socket.dev/blog/npm-phishing-campaign-leads-to-prettier-tooling-packages-compromise
# Confirm the patch is missing on this host
Get-Hotfix -Id <KB-from-advisory> -ErrorAction SilentlyContinue
# Install the rollup that ships the fix
Install-Module PSWindowsUpdate -Force -SkipPublisherCheck
Import-Module PSWindowsUpdate
Get-WindowsUpdate -KBArticleID <KB-from-advisory> -AcceptAll -Install -AutoReboot
# Verify the patch is now present
Get-Hotfix -Id <KB-from-advisory>
# Inventory missing patches across a Windows fleet via Ansible (winrm)
ansible windows -m win_updates -a "category_names=SecurityUpdates state=installed"
Verify the fix landed
# 1. Confirm the running version matches the fixed-in version from the advisory:
# https://socket.dev/blog/npm-phishing-campaign-leads-to-prettier-tooling-packages-compromise
# Use the platform-specific version probe above.
# 2. Re-scan with your vulnerability scanner (Nessus, Qualys, Tenable, OpenVAS).
# The scanner should no longer flag CVE-2025-54313 on the patched target.
# 3. Inspect recent service / kernel logs for crash loops or rollback events.
journalctl -u <service> --since "10 minutes ago"
dmesg --since "10 minutes ago"
If you can't patch immediately
Check the vendor advisory's "Workarounds" section. If the advisory lists no official workaround, patching is the only remediation. Compensating controls that reduce attack surface in the meantime: restrict network access to the management interface to a small admin allowlist, disable the affected feature if it is not in use, and monitor the relevant logs for the exploitation patterns referenced in the advisory.
How to verify the fix worked
- Confirm the running version matches the patched build from the vendor advisory.
- Re-run your vulnerability scanner; the CVE should clear.
- Review logs from before the patch for the exploitation signatures described in the advisory, and treat any matches as a possible compromise (rotate credentials, isolate the host, full IR).
Frequently asked questions
Related fixes
Other vulnerabilities in the same area that are worth patching alongside this one:
- How to Fix CVE-2025-14847: Information Disclosure in MongoDB Server — Information Disclosure in MongoDB Server
- How to Fix CVE-2025-48700: Cross-Site Scripting in Zimbra Collaboration Suite (ZCS) , Cross-Site Scripting in Zimbra Collaboration Suite (ZCS)
- How to Fix CVE-2025-4008: Command Injection in MeteoBridge , Command Injection in MeteoBridge
- How to Fix CVE-2025-27429: Improper Control of Generation of Code ('Code Injection' in SAP S/4HANA (Private Cloud) , Improper Control of Generation of Code ('Code Injection' in SAP S/4HANA (Private Cloud)
- How to Fix CVE-2025-32433: Authentication Bypass in otp , Authentication Bypass in otp
Is CVE-2025-54313 being exploited right now?
Yes. It is listed in the CISA Known Exploited Vulnerabilities catalog (added 2026-01-22), which means CISA has evidence of active exploitation.
What is the CVSS score for CVE-2025-54313?
CVSS 7.5 (High). Use this with your own asset exposure to set patching priority (internet-exposed systems first).
Do I need to take the system offline to patch?
It depends on the platform. Many appliances support hitless upgrade in HA pairs (upgrade standby, fail over, upgrade primary). Servers and applications usually need a service restart. Plan a maintenance window if HA is not available.
What if my version is not listed as affected?
Cross-check against the vendor advisory linked below. The CVE record reflects the vendor's official affected-products list at publication time; later-discovered variants are added through the same advisory or a follow-up CVE.
References
- Official vendor advisory: https://socket.dev/blog/npm-phishing-campaign-leads-to-prettier-tooling-packages-compromise
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-54313
- CISA KEV catalog: https://www.cisa.gov/known-exploited-vulnerabilities-catalog
- https://www.bleepingcomputer.com/news/security/popular-npm-linter-packages-hijacked-via-phishing-to-drop-malware/
- https://github.com/prettier/eslint-config-prettier/issues/339
- https://www.npmjs.com/package/eslint-config-prettier?activeTab=versions
- https://www.stepsecurity.io/blog/supply-chain-security-alert-eslint-config-prettier-package-shows-signs-of-compromise
*This guide was assembled from the official vendor advisory, NVD record, and CISA KEV listing on 2026-05-25. Always confirm against the vendor advisory before applying changes in production.*