VYPR
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.

PackageAffected versionsPatched versions
github.com/esm-dev/esm.shGo
<= 136

Affected products

1

Patches

1
492de92850dd

Ban urls with `..` segment

https://github.com/esm-dev/esm.shJe XiaSep 16, 2025via ghsa
1 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

News mentions

0

No linked articles in our index yet.