CVE-2025-59342
CVE-2025-59342 · esm.sh writes arbitrary files via path traversal in `X-Zone-Id` header
CVSS 5.5 · Medium · EPSS 3.9% · Public exploit
Compare with your installed version
Affected products and known fixed versions are public information. Compare them with your installed version.
- esm.shNo fix published
Assess your server’s risks
The free check gives you a rating and a risk summary by technology stack, without signing up. It does not answer whether this particular vulnerability affects you.
Monitoring matches public information against your servers’ software. Detailed findings for your servers include the order of updates.
curl -fsSL https://patchfirst.dev/check.sh | shChannels carry general technology news; monitoring reports new findings on your servers in your dashboard, through browser notifications, in Telegram or via a webhook.
This page contains facts from public vulnerability sources. Check the original advisory before updating.
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
- Updated
Fixes in distributions
- openSUSE-SU-2026:21483-1 · openSUSE Leap 16.0 ·
- SUSE-SU-2025:3799-1 · openSUSE Leap 15.6, SUSE Linux Enterprise Module for Package Hub 15 SP6 ·
- openSUSE-SU-2025:15576-1 · openSUSE Tumbleweed ·
Affected products and versions
esm.sh
- Versions
- <= 136: Affected
No fix published
Original sources
- https://github.com/esm-dev/esm.sh/security/advisories/GHSA-g2h5-cvvr-7gmw
- https://github.com/esm-dev/esm.sh/commit/833a29f42aeb0acbd7089a71be11dd0a292d3151
- https://github.com/esm-dev/esm.sh/blob/main/server/router.go#L116
- https://github.com/esm-dev/esm.sh/blob/main/server/router.go#L411
- https://nvd.nist.gov/vuln/detail/CVE-2025-59342