CVE-2026-102657 esm.sh: web.NewHandler allows arbitrary file read via encoded dot-segment path traversal
- Published
- Updated
- Exploit status
- No public exploit known
- CISA SSVC
- Proof of concept public · automatable: yes · technical impact: partial
Description
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.
Upgrade path
3 packages: 2 fixed.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| esm-dev esm.sh(Go) | < 0.2.0 | 0.2.0 | Fixed |
| esm-dev github.com/esm-dev/esm.sh/web(Go) | < 0.2.0 | 0.2.0 | Fixed |
| esm-dev esm.sh | = < 137_7 | No fix listed | Versions listed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| esm-dev github.com/esm-dev/esm.sh/web(Go) | < 0.2.0 | 0.2.0 |
| esm-dev esm.sh | = < 137_7 | No fix listed |
| esm-dev esm.sh(Go) | < 0.2.0 | 0.2.0 |
References
- https://github.com/esm-dev/esm.sh/security/advisories/GHSA-g3c2-rjq2-c763 exploit vendor-advisory
- https://github.com/esm-dev/esm.sh/pull/1376 patch
- https://github.com/esm-dev/esm.sh/commit/468b6b2a4b4dfec334cf6b33b01fcd4e5cd93bed patch
- https://github.com/esm-dev/esm.sh/commit/fc3b345e73aeaa0b7a05b6f27d91c05fdf5f9b53 patch
- https://github.com/esm-dev/esm.sh/releases/tag/v137_7
- nvd.nist.gov third-party-advisory vendor-advisory
- github.com product
- github.com
- github.com
- ENISA EUVD EUVD-2026-118494 third-party-advisory