Live › vulnerability › CVE-2025-59341
Go to dashboardesm.sh, a Go service that serves npm packages as ES modules, does not strip '..' from request paths, so a crafted URL makes it read and return files from the host filesystem. An attacker can reach files such as /etc/passwd, configuration files, environment files or the esm.db database, which can leak secrets and credentials.
Summary written from the sources below. Check the originals before acting.
First seen by InfraStack 2026-10-29 02:14 UTC, 0h before NVD. All times on this page are UTC.
Teams that run their own esm.sh server (the Go service in esm-dev/esm.sh) at version 136 or earlier are exposed, because the flaw is in the server's URL handling. Teams that only use the public hosted esm.sh CDN or install packages from npm without running esm.sh can skip it.
| Product | Ecosystem | Affected | Fixed in |
|---|---|---|---|
| github.com/esm-dev/esm.sh | go | <= 136 | – |
go.mod pins github.com/esm-dev/esm.sh at a version <= 136.curl --path-as-is 'http://<host>:<port>/pr/x/y@99/../../../../../../../../etc/passwd?raw=1&module=1' and see whether the response contains file contents.136; the fixed version is unknown from the sources... in the URL path at a reverse proxy or move the service behind an authenticated gateway.Each row is the first time that source carried this signal. The analyst’s rows are its own findings.
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
This page as .md · .json · in your agent: get_signal("CVE-2025-59341")
GitHub Advisory Database, CC-BY 4.0 · NVD data is provided by NIST and is public domain. Posts quoted belong to their authors.