CVE-2025-59342
MEDIUM 5.5CVSS 4.0esm.sh has arbitrary file write via path traversal in `X-Zone-Id` header
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.
- Published
- 17 Sep 2025
- Last modified
- 10 Sep 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Deferred
- Weakness
- CWE-24
- Also known as
- GHSA-g2h5-cvvr-7gmwGO-2025-3967
- Sources
- NVDJSONOSV GHSA-g2h5-cvvr-7gmwJSONOSV GO-2025-3967JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 4.0 | MEDIUM 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 |
| OSV | GitHub | CVSS 4.0 | 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 |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| OSV | Go | github.com/esm-dev/esm.sh | < 136.1 | 136.1 |
| OSV | Go | github.com/esm-dev/esm.sh | all versions |
References
- https://github.com/esm-dev/esm.sh/blob/main/server/router.go#L116 · WEB
- https://github.com/esm-dev/esm.sh/blob/main/server/router.go#L411 · WEB
- https://github.com/esm-dev/esm.sh/commit/833a29f42aeb0acbd7089a71be11dd0a292d3151 · WEB, FIX
- https://github.com/esm-dev/esm.sh/security/advisories/GHSA-g2h5-cvvr-7gmw · WEB, ADVISORY
- https://nvd.nist.gov/vuln/detail/CVE-2025-59342 · ADVISORY
- https://github.com/esm-dev/esm.sh · PACKAGE
- https://pkg.go.dev/vuln/GO-2025-3967 · WEB
History
- 25 Nov 2026 20:59 UTC · NVD: first stored (published 17 Sep 2025)
- 25 Nov 2026 20:14 UTC · OSV: first stored (published 24 Sep 2025)
- 25 Nov 2026 20:13 UTC · OSV: first stored (published 17 Sep 2025)