{"schemaVersion":3,"id":"CVE-2025-59342","aliases":["GHSA-g2h5-cvvr-7gmw","GO-2025-3967"],"status":"published","duplicateOf":null,"title":null,"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.","dates":{"published":"2025-09-17T17:59:34.163Z","modified":"2026-01-14T15:52:09.174Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":5.5,"severity":"medium","version":"4.0","versionLabel":"v4.0","source":"CVE.org","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","computed":false,"selection":"backend-summary"},"metrics":[{"version":"4.0","versionLabel":"v4.0","source":"CVE.org","score":5.5,"severity":"medium","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","exploitability":null,"impact":null,"computed":false},{"version":"4.0","versionLabel":"v4.0","source":"OSV · Go","score":6.9,"severity":"medium","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","exploitability":null,"impact":null,"computed":true},{"version":"4.0","versionLabel":"v4.0","source":"NVD","score":5.5,"severity":"medium","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","exploitability":null,"impact":null,"computed":false}]},"epss":{"probability":0.03006,"percentile":0.87203,"severity":"low","asOf":"2026-10-19T00:00:00.000Z","change":{"pp":-0.025000000000000022,"baselineDate":"2026-09-19T00:00:00.000Z","baselineScore":0.03031},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.03031,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.03031,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.03031,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.03031,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.03031,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.03031,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.03031,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.03031,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.03031,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.03031,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.03031,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.03031,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.03031,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.03031,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.03031,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.03031,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.03031,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.03031,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.03006,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.03006,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.03006,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.03006,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.03006,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.03006,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.03006,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.03006,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.03006,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.03006,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.03006,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.03006,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.03006,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.03006,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.03006,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.03006,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.03006,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.03006,"percentile":0.87203}],"last30":[{"date":"2026-09-19T00:00:00.000Z","score":0.03031,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.03031,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.03031,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.03031,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.03031,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.03031,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.03031,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.03031,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.03031,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.03031,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.03031,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.03031,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.03031,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.03006,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.03006,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.03006,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.03006,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.03006,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.03006,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.03006,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.03006,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.03006,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.03006,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.03006,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.03006,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.03006,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.03006,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.03006,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.03006,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.03006,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.03006,"percentile":0.87203}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[{"id":"52461","name":"esm-dev 136 - Path Traversal","source":"exploit-database","url":"https://www.exploit-db.com/exploits/52461","maturity":"poc","reliabilityScore":0.5,"verified":false,"type":null,"platforms":["multiple"],"requiresAuth":null,"exploitdb":{"verified":false,"type":"webapps","platform":"multiple","file":"exploits/multiple/webapps/52461.c","codes":["CVE-2025-59342"]},"metasploit":null}],"exploitCount":1,"weaknesses":[{"id":"CWE-24","name":"Path Traversal: '../filedir'","description":"The product uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize \"../\" sequences that can resolve to a location that is outside of that directory.","type":"weakness","status":"Incomplete","abstraction":"Variant","likelihoodOfExploit":null,"url":"https://cwe.mitre.org/data/definitions/24.html"}],"affected":[{"vendor":"esm-dev","product":"esm.sh","name":"esm.sh","label":"esm.sh","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"≤ 136","noFixRecorded":false,"fixedIn":null}],"versionsText":"≤ 136","eol":null,"hubHref":"/vendor/esm-dev/esmsh"},{"vendor":"github.com/esm-dev","product":"esm.sh","name":"github.com/esm-dev/esm.sh","label":"esm.sh","ecosystem":"Go","cpePart":null,"purl":"pkg:golang/github.com/esm-dev/esm.sh","purlType":"golang","versions":[{"text":"< 136.1","noFixRecorded":false,"fixedIn":null},{"text":"All versions","noFixRecorded":true,"fixedIn":null}],"versionsText":"< 136.1 | All versions (No fix recorded)","eol":null,"hubHref":null}],"affectedCount":2,"eol":{"hasEol":false,"count":0},"references":[{"url":"https://github.com/esm-dev/esm.sh/security/advisories/GHSA-g2h5-cvvr-7gmw","label":"github.com/esm-dev/esm.sh/security/advisories/GHSA-g2h5-cvvr-7gmw","hostname":"github.com","tags":["X Refsource CONFIRM","WEB","Advisory"]},{"url":"https://github.com/esm-dev/esm.sh/commit/833a29f42aeb0acbd7089a71be11dd0a292d3151","label":"github.com/esm-dev/esm.sh/commit/833a29f42aeb0acbd7089a71be11dd0a292d3151","hostname":"github.com","tags":["X Refsource MISC","WEB","FIX"]},{"url":"https://github.com/esm-dev/esm.sh/blob/main/server/router.go#L116","label":"github.com/esm-dev/esm.sh/blob/main/server/router.go","hostname":"github.com","tags":["X Refsource MISC","WEB"]},{"url":"https://github.com/esm-dev/esm.sh/blob/main/server/router.go#L411","label":"github.com/esm-dev/esm.sh/blob/main/server/router.go","hostname":"github.com","tags":["X Refsource MISC","WEB"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-59342","label":"nvd.nist.gov/vuln/detail/CVE-2025-59342","hostname":"nvd.nist.gov","tags":["Advisory"]},{"url":"https://github.com/esm-dev/esm.sh","label":"github.com/esm-dev/esm.sh","hostname":"github.com","tags":["PACKAGE"]},{"url":"https://pkg.go.dev/vuln/GO-2025-3967","label":"pkg.go.dev/vuln/GO-2025-3967","hostname":"pkg.go.dev","tags":["WEB"]}],"lineage":{"upstream":[],"downstream":["OPENSUSE-SU-2025:15576-1","OPENSUSE-SU-2026:21483-1","SUSE-SU-2025:3799-1"],"duplicates":[],"related":["OPENSUSE-SU-2025:15576-1","OPENSUSE-SU-2026:21483-1","SUSE-SU-2025:3799-1"]},"timeline":[{"kind":"published","date":"2025-09-17T17:59:34.163Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2026-01-14T15:52:09.174Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"risk":{"score":33,"level":"medium","profile":"Default","thresholds":{"critical":75,"high":50,"medium":25,"low":10}},"meta":{"dataAsOf":"2026-10-20T06:20:46.379Z","stale":false,"partial":false}}