CVE-2025-54313: Prettier eslint-config-prettier Embedded Malicious Code Vulnerability
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.
This vulnerability affects the eslint-config-prettier package used with Prettier in JavaScript projects. It stems from embedded malicious code that runs automatically during package installation on Windows systems, executing an install.js script that launches node-gyp.dll malware. The issue matters because development environments often pull dependencies without deep inspection, allowing supply-chain compromise to occur silently during routine npm or yarn operations.
How it works
The weakness is classified as CWE-506, embedded malicious code. An attacker places the malicious payload inside the published package so that the package manager's standard install lifecycle triggers execution. On Windows, the install.js file runs and starts node-gyp.dll. No further attacker interaction is required after the initial package installation.
Am I affected? How to find it in your systems
- Locate Node.js projects that declare eslint-config-prettier in package.json or lockfiles managed by npm, yarn, or pnpm.
- Inventory all direct and transitive dependencies; compare installed versions against the vendor advisory to identify affected instances.
- Scan development workstations and CI pipelines for the presence of install.js files or node-gyp.dll binaries introduced under the eslint-config-prettier path.
- Review Windows event logs and process-creation telemetry for unexpected execution of node-gyp.dll during package-install steps.
How to remediate
Apply the vendor-supplied update referenced in the official advisory. After patching, remove any previously installed affected packages and clear associated cache directories. For this class of supply-chain weakness, organizations should also enforce package-integrity verification through lockfile enforcement and restrict installation sources to trusted registries.
If you can't patch immediately
- Isolate affected build and developer systems from production networks until remediation is complete.
- Monitor endpoints for execution of install.js or node-gyp.dll and alert on any matches.
- Follow CISA BOD 22-01 guidance for cloud-hosted build services or discontinue use of the package if mitigations cannot be applied.
If your data may have been exposed
Actively exploited vulnerabilities of this type have led to data breaches. You can run a free exposure scan of your email addresses against known breach datasets to check for prior compromise.
AICompiled with AI assistance from public sources and published under our editorial standards.
Details
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:H/A:NReferences
- github.com/prettier/eslint-config-prettier/issues/339
- news.ycombinator.com/item?id=44608811
- news.ycombinator.com/item?id=44609732
- socket.dev/blog/npm-phishing-campaign-leads-to-prettier-tooling-packages-comprom
- www.bleepingcomputer.com/news/security/popular-npm-linter-packages-hijacked-via-
- www.npmjs.com/package/eslint-config-prettier?activeTab=versions
- www.stepsecurity.io/blog/supply-chain-security-alert-eslint-config-prettier-pack
- github.com/community-scripts/ProxmoxVE/discussions/6115