Description
esm.sh is a no-build content delivery network (CDN) for web development. In 137 and earlier, the legacy router first retrieves a response from legacyServer, parses the incoming request path, and ultimately writes the data to storage via buildStorage.Put. The router concatenates the path components without sanitizing them, producing a storage key. When this key is used, the underlying file system resolves the relative segments and writes the file to the specified path. Thus an attacker can craft a request that writes data to arbitrary locations on the server.
Published: 2026-05-28
Score: 8.7 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

In esm.sh versions 137 and earlier, the legacy router builds a storage key from the request path without sanitizing path components. When the key is used, the operating system resolves the relative segments and writes data to the target location, allowing an attacker to write data anywhere on the server. Based on the description, it is inferred that the arbitrary file write could lead to remote code execution if the attacker can embed malicious payloads in the written files.

Affected Systems

The vulnerability affects the esm-dev:esm.sh CDN service for applications that use legacy routing in releases 137 and earlier. The affected code path resides in the legacyServer and buildStorage modules that compose the storage key directly from the HTTP request path.

Risk and Exploitability

The CVSS score of 8.7 indicates a high severity. The EPSS score is not available, and the vulnerability is not listed in the KEV catalog, but based on the description, the exposed HTTP interface makes remote exploitation likely. Attackers can trigger the flaw by sending a crafted request containing path traversal sequences, which the legacy router does not validate before writing to storage.

Generated by OpenCVE AI on May 28, 2026 at 16:57 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade esm.sh to a supported version (v138 or later) that removes the legacy router.
  • If the legacy router cannot be disabled immediately, remove it from the configuration or block the legacy endpoints via the CDN host.
  • Change file system permissions to restrict write access for the storage process to a non-privileged directory.
  • Implement input validation to reject paths containing traversal characters such as '..' before they reach the storage layer.

Generated by OpenCVE AI on May 28, 2026 at 16:57 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-3636-h3vx-6465 esm.sh: Legacy Route Path Traversal Can Lead to RCE
History

Sat, 30 May 2026 21:15:00 +0000

Type Values Removed Values Added
First Time appeared Esm-dev
Esm-dev esmsh
Vendors & Products Esm-dev
Esm-dev esmsh

Thu, 28 May 2026 15:30:00 +0000

Type Values Removed Values Added
Description esm.sh is a no-build content delivery network (CDN) for web development. In 137 and earlier, the legacy router first retrieves a response from legacyServer, parses the incoming request path, and ultimately writes the data to storage via buildStorage.Put. The router concatenates the path components without sanitizing them, producing a storage key. When this key is used, the underlying file system resolves the relative segments and writes the file to the specified path. Thus an attacker can craft a request that writes data to arbitrary locations on the server.
Title esm.sh: Legacy Route Path Traversal Can Lead to RCE
Weaknesses CWE-22
References
Metrics cvssV4_0

{'score': 8.7, 'vector': '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'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-05-28T14:44:20.782Z

Reserved: 2026-05-06T21:49:12.425Z

Link: CVE-2026-44593

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Deferred

Published: 2026-05-28T16:16:24.587

Modified: 2026-05-29T16:32:14.400

Link: CVE-2026-44593

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-05-30T21:00:12Z

Weaknesses