Skip to content
OpenAdvisories
Medium · 5.5 Scanner template Public exploit CVE-2025-59342 EUVD-2025-29764GHSA-g2h5-cvvr-7gmwGO-2025-3967

esm.sh writes arbitrary files via path traversal in `X-Zone-Id` header

Published Sep 17, 2025 · Updated Jan 14, 2026 · Assigned by GitHub_M

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.

Affected products

VendorProductAffectedFixed
esm-dev esm.sh <= 136 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
SLES 15 SP6 govulncheck-vulndb 0.0.20251023T162509-150000.1.110.1 SUSE-SU-2025:3799-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed govulncheck-vulndb 0.0.20250924T192141-1.1 openSUSE-SU-2025:15576-1
openSUSE Leap 16.0 govulncheck-vulndb 0.0.20260723T184607-160000.1.1 openSUSE-SU-2026:21483-1
openSUSE Leap 15.6 govulncheck-vulndb 0.0.20251023T162509-150000.1.110.1 SUSE-SU-2025:3799-1

Public exploits

Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.

Third-party code, not reviewed by us. Public PoCs are sometimes fake or contain malware. Read the code first and run it only in an isolated lab, against systems you are authorised to test.

Exploit-DB 1

GitHub 1 repository

Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.

Automated scanner template

A ready-made Nuclei template detects this vulnerability automatically. Vulnerabilities with public scanner templates are typically probed across the internet soon after the template appears — exposed systems should be patched first.

Source: projectdiscovery/nuclei-templates (MIT) — updated daily. Only links are listed.

Affected packages

EcosystemPackageAffectedFixedRecord
Go github.com/esm-dev/esm.sh < 136.1 136.1 GHSA-g2h5-cvvr-7gmw
Go github.com/esm-dev/esm.sh all versions — GO-2025-3967

Advisories 3

References