Path traversal in esm.sh web.NewHandler allows arbitrary file read
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Information disclosure
- Confidentiality · integrity · availability
- High · None · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA. Impact type from CWE-22 and the CVSS impact.
Summary
esm.sh server versions before 137_7 are affected. The web.NewHandler static file server joins the URL-decoded request path to the application directory without checking that the result stays inside it (CWE-22). Encoded dot segments bypass the plain traversal redirect of Go's ServeMux, so an unauthenticated remote attacker can make the server read and return files outside the application directory that the server process can read.
Written with Claude Haiku 5.5 from the sources below · 2026-11-06
Description from the CNA
esm.sh is a no-build content delivery network (CDN) for web development. Prior to server version 137_7, the documented web.NewHandler static file server in web/handler.go joins the URL-decoded r.URL.Path with Config.AppDir without verifying that the result remains inside the configured application directory. URL-encoded dot segments such as %2e%2e bypass the plain traversal redirect performed by Go's ServeMux, allowing an unauthenticated remote attacker to make the server open and return files outside Config.AppDir that are readable by the server process. The confirmed impact is file disclosure only, and the issue is reachable with Dev disabled. This issue is fixed in server version 137_7.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
Remediation
Update esm.sh to server version 137_7, which fixes the issue.
Written with Claude Haiku 5.5 from the sources below · 2026-11-06
- Fix · CNA esm.sh (esm-dev) Fixed in 137_7
Timeline
- 2026-11-06 Threatist record created from CVE-2026-102657
- 2026-11-08 Priority changed: MEDIUM → LOW
References
Other 5
- https://github.com/esm-dev/esm.sh/security/advisories/GHSA-g3c2-rjq2-c763
- https://github.com/esm-dev/esm.sh/pull/1376
- https://github.com/esm-dev/esm.sh/commit/468b6b2a4b4dfec334cf6b33b01fcd4e5cd93bed
- https://github.com/esm-dev/esm.sh/commit/fc3b345e73aeaa0b7a05b6f27d91c05fdf5f9b53
- https://github.com/esm-dev/esm.sh/releases/tag/v137_7
More esm-dev vulnerabilities
- TI-2025-40211 esm.sh CDN service has arbitrary file write via tarslip CVSS 3.1CRITICAL 9.8
- TI-2026-32504 esm.sh: Legacy Route Path Traversal Can Lead to RCE CVSS 4.0HIGH 8.7
- TI-2025-32063 esm.sh is vulnerable to full-response SSRF CVSS 4.0HIGH 8.7
- TI-2025-40212 esm.sh CDN service has JS Template Literal Injection in CSS-to-JavaScript CVSS 3.1CRITICAL 9.6
- TI-2025-36902 Local File Inclusion in esm.sh CVSS 4.0HIGH 7.7
- TI-2026-32505 esm.sh: Path Traversal via package.json browser field allows reading arbitrary server files CVSS 3.1HIGH 7.5
Sources
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences