Skip to main content
← All vulnerabilities
CVE-2025-59342GO-2025-3967GHSA-G2H5-CVVR-7GMW

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

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 136.1
1 on Exploit-DB, 1 proof of concept on GitHub, 1 Nuclei template
  • Exploitation: poc
  • Automatable: yes
  • Technical impact: partial

Summary

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.

Timeline

  1. CVE published
  2. CISA SSVC assessment

    Exploitation: poc · Automatable: yes · Technical impact: partial

  3. Public exploit on Exploit-DB

    EDB-52461

  4. Record last updated

Affected versions

  • esm-dev esm.sh

    through 136

  • github.com/esm-dev/esm.shGo

    All versions

  • github.com/esm-dev/esm.shGo

    fixed in 136.1

References 7

GitHub · esm-dev/esm.sh

Exploit-DB

GitHub · projectdiscovery/nuclei-templates

GitHub · byteReaper77/CVE-2025-59342