CVE-2025-59342: esm.sh writes arbitrary files via path traversal in `X-Zone-Id` header
Vulnerability summary
CVE-2025-59342 is a medium (CVSS 5.5) Path Traversal: '../filedir' vulnerability in esm-dev esm.sh. EPSS estimates a 3.28% chance of exploitation in the next 30 days, higher than 88.8% of scored vulnerabilities. 1 public exploit is recorded.
Not severe (CVSS 5.5, network access); no exploitation reported by the 5 checked sources
CIRCL last checked 05-12-2026
Source freshness unavailable
How is this decided?Advisory lineage
Upstream 0 · Downstream 3 · Related 3Timeline
- 17-09-2025PublishedVulnerability first disclosed.
- 14-01-2026Last modifiedVulnerability information updated.
Description
esm.sh is a nobuild content delivery network(CDN) for modern web development. In 136 and earlier, a path-traversal flaw in the handling of the X-Zone-Id HTTP header allows an attacker to cause the application to write files outside the intended storage location. The header value is used to build a filesystem path but is not properly canonicalized or restricted to the application’s storage base directory. As a result, supplying ../ sequences in X-Zone-Id causes files to be written to arbitrary directories. Version 136.1 contains a patch.
CVSS metrics
3 scores · 3 sources · 1 version- OSV · GoEcosystem advisory · calculated6.9MediumCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N/E:PDiffers
- NVDNIST5.5MediumCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N/E:P/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
EPSS trend
Probability
3.28%
Chance of exploitation in the next 30 days
Percentile
89%
Versus all other CVEs
30-day change
Increase +0.13 pp
From 3.15% on 04-11-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
1 foundesm-dev 136 - Path Traversal
Maturity: poc
Weaknesses
CWE · root causeAffected systems
Known conditions: network-reachable, no authentication, no user interaction (CVSS vector). Other conditions: not stated in public data.
Esm-dev1 product
- esm.sh≤ 136
Github.com/esm-dev1 product
- esm.sh< 136.1 | All versions (No fix recorded)
2 vendors · 2 products
References
7 links- github.com/esm-dev/esm.shPACKAGE