CVE-2025-59342 in Modern products
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 bu...
Affects 0 products from 1 vendor. Facts below cite their sources.
Affected products and versions
| Vendor | Product | Affected versions |
|---|---|---|
| Modern | — | — |
A product listed here is affected only at the versions shown. Use the free check to test the exact version you run.
Fix and vendor advisory
No official vendor advisory link on record. See the CVE record.
Exploitation
| CISA known-exploited | Not in the CISA KEV catalog |
|---|---|
| Public exploit | Reported · reference |
Official 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.
Source: NIST NVD / MITRE CVE.
Record details
| CVE ID | CVE-2025-59342 |
|---|---|
| BreachSpider ID | BS-2025-GLOBAL-298988-I |
| Published | 2025-09-17 |
| Last modified | 2026-06-17 |
| Weakness (CWE) | |
| Source | NVD |
Weakness definitions
CWE-24: CWE-24
Analysis AI-written, not human-reviewed
A path-traversal flaw in esm.sh versions 136 and earlier allows attackers to write files outside the intended storage location by manipulating the X-Zone-Id HTTP header.
The vulnerability arises from improper canonicalization and lack of restriction on the X-Zone-Id HTTP header value, which is used to construct filesystem paths. An attacker can exploit this to write files to arbitrary locations on the server.
Questions
What is CVE-2025-59342?
A path-traversal flaw in esm.sh versions 136 and earlier allows attackers to write files outside the intended storage location by manipulating the X-Zone-Id HTTP header.
Is CVE-2025-59342 actively exploited?
Public exploit available for CVE-2025-59342. Exploitation risk elevated.
How do I remediate CVE-2025-59342?
Priority: HIGH.
What systems are affected by CVE-2025-59342?
CVE-2025-59342 affects Modern.
For developers and AI agents
Run this check from your own code or agent
REST API
curl -s https://breachspider.com/api/v1/assets/correlate-cves \
-H "Authorization: Bearer $BREACHSPIDER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"assets":[{"asset_id":"dev-1","vendor":"Modern","product":"EDS-518A","version":"1.0"}]}'
MCP for AI agents
# hosted: add as a connector
https://mcp.breachspider.com/mcp
# local
pipx install breachspider-mcp
Free trial: 14 days, 750 device checks, no card.
Page facts from NVD, MITRE, CISA and vendor advisories, record last modified 2026-06-17.