High severityOSV Advisory· Published Sep 17, 2025· Updated Apr 15, 2026
CVE-2025-59341
CVE-2025-59341
Description
esm.sh is a nobuild content delivery network(CDN) for modern web development. In 136 and earlier, a Local File Inclusion (LFI) issue was identified in the esm.sh service URL handling. An attacker could craft a request that causes the server to read and return files from the host filesystem (or other unintended file sources).
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
github.com/esm-dev/esm.shGo | <= 136 | — |
Affected products
1Patches
11 file changed · +1 −1
server/router.go+1 −1 modified@@ -72,7 +72,7 @@ func esmRouter(db Database, esmStorage storage.Storage, logger *log.Logger) rex. pathname := ctx.R.URL.Path // ban malicious requests - if strings.HasPrefix(pathname, "/.") || strings.HasSuffix(pathname, ".env") || strings.HasSuffix(pathname, ".php") { + if strings.HasSuffix(pathname, ".env") || strings.HasSuffix(pathname, ".php") || strings.Contains(pathname, "/.") { return rex.Status(404, "not found") }
Vulnerability mechanics
Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
6- github.com/advisories/GHSA-49pv-gwxp-532rghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2025-59341ghsaADVISORY
- github.com/esm-dev/esm.sh/blob/c62f191d32639314ff0525d1c3c0e19ea2b16143/server/router.gonvdWEB
- github.com/esm-dev/esm.sh/commit/492de92850dd4d350c8b299af541f87541e58a45ghsaWEB
- github.com/esm-dev/esm.sh/security/advisories/GHSA-49pv-gwxp-532rnvdWEB
- pkg.go.dev/vuln/GO-2025-3962ghsaWEB
News mentions
0No linked articles in our index yet.