CVE-2025-59342 json
esm.sh writes arbitrary files via path traversal in `X-Zone-Id` header
published 2025-09-17 13 mo ago modified 2026-09-10 1 mo ago also EUVD-2025-29764 , GHSA-g2h5-cvvr-7gmw , GO-2025-3967
- cvss
- 5.5
- version 4.0, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 3.2%
- EPSS 3.2% chance of exploitation in 30 days, percentile 88%
- public exploits
- 1
- Exploit-DB, plus a Nuclei check
Summary
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.
Patch / fix
- go github.com/esm-dev/esm.sh 136.1
- govulncheck-vulndb SLE Module for Package Hub 15 SP6, openSUSE Leap 15.6 0.0.20251023T162509-150000.1.110.1
suse advisories SUSE-SU-2025:3799-1
- govulncheck-vulndb openSUSE Leap 16.0 0.0.20260723T184607-160000.1.1
- govulncheck-vulndb openSUSE Tumbleweed 0.0.20250924T192141-1.1
opensuse advisories openSUSE-SU-2026:21483-1openSUSE-SU-2025:15576-1
Timeline
- Published
- First public exploit (EDB-52461)
CISA SSVC
- Exploitation
- Proof of concept is public
- Automatable
- yes
- Technical impact
- partial
- Assessed
- 13 mo ago
Exploit prediction
3.15% chance of exploitation in the next 30 days, higher than 88% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- EDB-52461 esm-dev 136 - Path Traversal webapps, 2025-12-16
- Nuclei template esm.sh <= v136 - Arbitrary File Write via Path Traversal nuclei detection template
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 4.0 | 5.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 |
| CNA | 4.0 | 5.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 |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| go | github.com/esm-dev/esm.sh | <136.1 all versions |
136.1 |
Affected products
- esm-dev esm.sh
Classification
- Weakness
-
- CWE-24 Path Traversal: '../filedir'
References
-
github.com
/esm-dev/esm.sh/commit/833a29f42aeb0acbd7089a71be11dd0a292d3151
web, patch
-
github.com
/esm-dev/esm.sh/security/advisories/GHSA-g2h5-cvvr-7gmw
web, advisory
-
github.com
/esm-dev/esm.sh/blob/main/server/router.go#L116
web
-
github.com
/esm-dev/esm.sh/blob/main/server/router.go#L411
web
-
nvd.nist.gov
/vuln/detail/CVE-2025-59342
advisory
-
github.com
/esm-dev/esm.sh
package
-
pkg.go.dev
/vuln/GO-2025-3967
web
Sources
- CVE List CVE-2025-59342
- GitHub Advisory GHSA-g2h5-cvvr-7gmw
- NVD CVE-2025-59342
- OSV GO-2025-3967
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.
CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.