CVE-2025-59341 Local File Inclusion in esm.sh
Attackers can exploit URL handling flaws in the esm.sh CDN to read arbitrary files from the host filesystem.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2025-59341?
CVE-2025-59341 is a high-severity path traversal vulnerability in esm-dev esm.sh, published on 17 Sep 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official 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).
Weakness: CWE-23
Which versions are affected by CVE-2025-59341?
3 open source packages ship an affected version, including github.com/esm-dev/esm.sh.
| Package | Affected | Fixed in |
|---|---|---|
github.com/esm-dev/esm.sh Go | All versions | None |
github.com/esm-dev/esm.sh Go | All versions to 136 | None |
github.com/esm-dev/esm.sh Go | All versions to 136 | None |
How do I fix CVE-2025-59341?
Upgrade to a fixed version.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is CVE-2025-59341 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-59341 exists.
Public exploit code: 1 Nuclei template.
Sources
Also known as GHSA-49pv-gwxp-532r, GO-2025-3962.