CVE-2025-59342 Details
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.
A path traversal vulnerability has been identified in esm.sh, a no-build content delivery network for modern web development. This issue affects versions through 136. The vulnerability arises from improper handling of the X-Zone-Id HTTP header, which is used to construct filesystem paths. The header value is not adequately sanitized or confined to the application's designated storage directory. Consequently, an attacker can exploit this flaw by injecting ../ sequences into the X-Zone-Id header, causing files to be written to arbitrary locations outside the intended directory. For example, files could be redirected to the user's home directory under .esmd/modules/transform/<id>/, instead of the correct .esmd/storage/modules/transform/ path.
The vulnerability can be remediated by removing any .. sequences from the X-Zone-Id header before processing the request.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Sep 17, 2025CISA-ADP
Assessed Sep 17, 2025References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-24 | Path Traversal: '../filedir' | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| esm.sh | All versions |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Jan 14, 2026 | CVE Modified | [email protected] |
| Sep 17, 2025 | New CVE Received | [email protected] |
Volerion