CVE-2025-59342esm.sh writes arbitrary files via path traversal in `X-Zone-Id` header
- 5.5MediumCVSS base score
- 3.2%Exploitation in 30 daysEPSS · top 12% of all CVEs
- NoKnown exploitednot in CISA's KEV catalog
- 2Public exploitsMetasploit, Nuclei and Exploit-DB
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.
Public exploit
An exploit or proof of concept is public: anyone can try it against an unpatched system. The public collections list a Nuclei template and an Exploit-DB entry for it. CISA's SSVC rates its exploitation: a proof of concept is public.
Show the exploits2
Nuclei templates1 template
- esm.sh <= v136 - Arbitrary File Write via Path Traversal (Nuclei template) (opens in a new tab)
http/cves/2025/CVE-2025-59342.yamlSeverity medium
Exploit-DB1 entry
- esm-dev 136 - Path Traversal (Exploit-DB entry) (opens in a new tab)
EDB-ID 52461webapps, multiplepublished 16 Dec 2025Not verified
Modules, templates and exploits as listed by the Metasploit Framework (BSD-3-Clause), ProjectDiscovery's Nuclei templates (MIT) and the Exploit Database (GPLv2), read once a day. Where the data comes from
Timeline
ID reserved
By GitHub_M
- 5 days later
· 5 days later
Published
- 4 months later
· 4 months later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| GitHub_MCNA (assigner) | 4.0 | Medium5.5 | CVSS: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 |
| NVDNVD · Deferred | 4.0 | Medium5.5 | CVSS: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 (exploitation in 30 days)
- 3.2% · top 12% of all CVEs (13 Nov 2026)
- CISA SSVC
- Exploitation: poc · Automatable: yes · Technical impact: partial
The list uses the assigner's score when there is one, then CISA's, then NVD's: Medium 5.5.
Affected products
Affected packages
From reviewed advisories of the GitHub Advisory Database.
- Gogithub.com/esm-dev/esm.shGHSA-g2h5-cvvr-7gmw (opens in a new tab)
References
References4
- https://github.com/esm-dev/esm.sh/security/advisories/GHSA-g2h5-cvvr-7gmw (opens in a new tab)x_refsource_CONFIRM
- https://github.com/esm-dev/esm.sh/commit/833a29f42aeb0acbd7089a71be11dd0a292d3151 (opens in a new tab)x_refsource_MISC
- https://github.com/esm-dev/esm.sh/blob/main/server/router.go#L116 (opens in a new tab)x_refsource_MISC
- https://github.com/esm-dev/esm.sh/blob/main/server/router.go#L411 (opens in a new tab)x_refsource_MISC
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- EUVD EUVD-2025-29764 (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisory GHSA-g2h5-cvvr-7gmw (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://cveledger.app/cve/CVE-2025-59342)Record last updated .