CVE-2025-59342: esm.sh · Path Traversal: '../filedir
Affects esm.shSource CVE Database V5
Public exploit available (Exploit-DB) · CVSS 5.5 Medium.
Data as of 26 Oct 2026, 11:42 UTC
- EPSS
- 3.0% chance of exploitation in 30 days – higher than 87% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
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:PExploitation evidence
t = 0 is the CVE’s publication on cve.org
Disclosed: evidence found.
CVE published 17 Sep 2025
Detectable: evidence found.
nuclei template: esm.sh <= v136 - Arbitrary File Write via Path Traversal
Weaponised: evidence found.
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
Timeline
CVE ID reserved
by GitHub, Inc.
, 5 days before disclosure
CVE published
on cve.org
, t = 0
In Threat Radar
record ingested
, 10 minutes after disclosure
First Exploit-DB entry (opens in a new tab)
esm-dev 136 - Path Traversal
, 90 days after disclosure
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 26 Oct 2026.
What to do
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| esm-dev esm.sh | Affected
| Fixed in– |
AI-suggested
- Upgrade esm.sh to version 136.1 or later immediately to apply the official patch addressing the path traversal issue.
- Implement strict input validation and sanitization on all HTTP headers, especially those used in filesystem path construction, to reject or canonicalize any '../' sequences or other traversal patterns.
- Employ filesystem access controls and sandboxing to limit the directories where the application can write files, minimizing the impact of any potential traversal attempts.
- Monitor server logs for suspicious X-Zone-Id header values or unusual file write activities indicative of exploitation attempts.
- Conduct regular security audits and code reviews focusing on path handling and input validation in web-facing components.
- Consider deploying Web Application Firewalls (WAFs) with rules to detect and block path traversal payloads targeting HTTP headers.
- Educate development teams on secure coding practices related to path handling to prevent recurrence of similar vulnerabilities.
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.
References
- github.com/esm-dev/esm.sh/security/advisories/GHSA-g2h5-cvvr-7gmw (opens in a new tab)
- github.com/esm-dev/esm.sh/commit/833a29f42aeb0acbd7089a71be11dd0a292d3151 (opens in a new tab)
- github.com/esm-dev/esm.sh/blob/main/server/router.go (opens in a new tab)
- github.com/esm-dev/esm.sh/blob/main/server/router.go (opens in a new tab)