Detect Prettier eslint-config-prettier Embedded Malicious Code (CVE-2025-54313) in Sumo Logic CSE
Detects exploitation indicators related to CVE-2025-54313, a supply chain compromise affecting the eslint-config-prettier npm package (Prettier). The package was trojanized with embedded malicious code (CWE-506), enabling arbitrary code execution during npm install or build processes. This vulnerability is listed in CISA's Known Exploited Vulnerabilities catalog.
MITRE ATT&CK
- Tactic
- Initial Access Execution Persistence
Sumo Detection Query
_sourceCategory=* ("eslint-config-prettier" OR "npm install")
| parse regex "(?i)(?P<pkg_ref>eslint-config-prettier[^\s]*)" nodrop
| parse regex "(?P<file_ext>\.(exe|dll|sh|ps1|bat))" nodrop
| parse regex "dest=(?P<dest_host>[^\s]+)" nodrop
| where !isEmpty(pkg_ref) OR !isEmpty(file_ext)
| where if(!isEmpty(dest_host), !(dest_host matches "*npmjs.org*" or dest_host matches "127.0.0.1" or dest_host matches "localhost"), true)
| eval severity = if(!isEmpty(file_ext) AND (file_ext = ".exe" OR file_ext = ".dll"), "critical", "high")
| fields _sourceHost, _sourceCategory, pkg_ref, file_ext, dest_host, severity, _messagetime
| sort by _messagetime desc Sumo Logic query searching for log entries referencing eslint-config-prettier, suspicious binary file extensions dropped in related processes, and outbound network connections from node processes to external hosts.
Data Sources
Required Tables
False Positives & Tuning
- CI/CD pipeline logs showing eslint-config-prettier installation before patching
- Security audit logs generated by npm audit commands
- Log forwarding agents that include package names in metadata fields
Other platforms for CVE-2025-54313
Testing Methodology
Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.
- Test 1Simulate Malicious postinstall Hook Execution via eslint-config-prettier
Expected signal: EDR should record: npm parent process spawning bash, bash executing malicious.sh, file creation of pwned.txt, outbound network attempt to 127.0.0.1:9999
- Test 2Detect eslint-config-prettier in Installed Node Modules
Expected signal: Process events showing find and python3 spawned from shell; file read events on node_modules/eslint-config-prettier/package.json across filesystem
- Test 3Simulate Outbound Exfiltration from Node Process Post-Install
Expected signal: EDR network telemetry showing node process initiating outbound TCP connection; process command line containing 'process.env' and network connection attempt
Unlock Pro Content
Get the full detection package for CVE-2025-54313 including response playbook, investigation guide, and atomic red team tests.