{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2025-59342","id":"CVE-2025-59342","title":"esm.sh writes arbitrary files via path traversal in `X-Zone-Id` header","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 dir","descriptionLong":"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":"2025-09-17T17:59:34.163Z","updated":"2026-10-28T02:30:30.022975992Z","reserved":"2025-09-12T12:36:24.636Z","status":"Deferred","rejected":false,"assigner":"GitHub_M","metric":{"version":"4.0","score":5.5,"vector":"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","rating":"medium","source":"GitHub_M"},"metrics":[{"version":"4.0","score":5.5,"vector":"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","rating":"medium","source":"GitHub_M"},{"version":"4.0","score":5.5,"vector":"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","rating":"medium","source":"github.com"},{"version":"4.0","score":null,"vector":"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","rating":"unrated","source":"OSV"},{"version":"4.0","score":null,"vector":"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","rating":"medium","source":"GitHub"}],"rating":"medium","products":["esm-dev esm.sh"],"affectedProducts":[{"vendor":"esm-dev","product":"esm.sh","defaultStatus":null,"versions":[{"version":"<= 136","status":"affected"}],"platforms":[]}],"packages":[{"ecosystem":"Go","name":"github.com/esm-dev/esm.sh","purl":"pkg:golang/github.com/esm-dev/esm.sh","ranges":["<136.1","all versions"],"fixed":["136.1"],"advisory":"GHSA-g2h5-cvvr-7gmw"}],"cwes":["CWE-24"],"aliases":["GHSA-g2h5-cvvr-7gmw","GO-2025-3967"],"references":[{"url":"https://github.com/esm-dev/esm.sh/security/advisories/GHSA-g2h5-cvvr-7gmw","tags":["x_refsource_CONFIRM","advisory","web"]},{"url":"https://github.com/esm-dev/esm.sh/commit/833a29f42aeb0acbd7089a71be11dd0a292d3151","tags":["x_refsource_MISC","fix","web"]},{"url":"https://github.com/esm-dev/esm.sh/blob/main/server/router.go#L116","tags":["x_refsource_MISC","web"]},{"url":"https://github.com/esm-dev/esm.sh/blob/main/server/router.go#L411","tags":["x_refsource_MISC","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/59xxx/CVE-2025-59342.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-59342","tags":["advisory"]},{"url":"https://github.com/esm-dev/esm.sh","tags":["package"]},{"url":"https://pkg.go.dev/vuln/GO-2025-3967","tags":["web"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"poc","automatable":"yes","technicalImpact":"partial"},"epss":0.03281,"epssPercentile":0.88695,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2025-59342","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-59342","ok":true,"note":"Deferred"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2025-59342","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-g2h5-cvvr-7gmw","ok":true,"note":"GHSA-g2h5-cvvr-7gmw"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2025-59342","ok":true,"note":"scored 2026-11-18"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}