esm.sh: web.NewHandler allows arbitrary file read via encoded dot-segment path traversal
- CVE-2026-102657
- GHSA-g3c2-rjq2-c763
- GO-2026-6954
- EUVD-2026-118494
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.
Text from the CVE.org record.
Recommendation
github.com/esm-dev/esm.sh
- If you run a version before 0.2.0update to 0.2.0 or latergithub.com/esm-dev/esm.sh 0.2.0 on its registry (opens in a new tab)
github.com/esm-dev/esm.sh/web
- If you run a version before 0.2.0update to 0.2.0 or latergithub.com/esm-dev/esm.sh/web 0.2.0 on its registry (opens in a new tab)
Taken from the version ranges the sources state. Check the vendor advisory: nothing is said about versions the ranges do not list. Breaking-change risk is read from the version numbers only.
Affected
esm-dev esm.sh
Affected versions Fixed in < 137_7 none stated github.com/esm-dev/esm.shGo
Affected versions Fixed in before 0.2.0 0.2.0 github.com/esm-dev/esm.sh/webGo
Affected versions Fixed in before 0.2.0 0.2.0
Product versions from the CVE.org record.
Timeline
- Published
Related news
No article from the followed outlets names this vulnerability.