Description
esm.sh is a no-build content delivery network (CDN) for web development. Prior to server version 137_7, the documented web.NewHandler static file server in web/handler.go joins the URL-decoded r.URL.Path with Config.AppDir without verifying that the result remains inside the configured application directory. URL-encoded dot segments such as %2e%2e bypass the plain traversal redirect performed by Go's ServeMux, allowing an unauthenticated remote attacker to make the server open and return files outside Config.AppDir that are readable by the server process. The confirmed impact is file disclosure only, and the issue is reachable with Dev disabled. This issue is fixed in server version 137_7.
Published: 2026-11-06
Score: 7.5 High
EPSS: n/a
KEV: No
Impact: File Disclosure
Action: Patch
AI Analysis

Impact

The vulnerability exists in the web.NewHandler static file server of esm.sh. The handler concatenates the request path with the configured application directory without ensuring that the resulting path remains under that directory. URL‐encoded dot segments such as %2e%2e bypass Go’s internal redirection checks, allowing an attacker to craft a request that resolves to arbitrary files on the server. The sole confirmed impact is the disclosure of files readable by the server process; there is no privilege escalation or code execution. This flaw is associated with CWE‑22.

Affected Systems

The issue affects all esm.sh server releases before version 137_7. Any instance of the CDN running an older server is vulnerable, regardless of the deployment environment, and the vulnerability can be exploited even when developer mode is disabled. The affected product is esm.sh delivered by esm-dev.

Risk and Exploitability

The CVSS score of 7.5 places the flaw in the high severity range, and while the EPSS score is not available, the vulnerability is not listed in CISA’s KEV catalog. An unauthenticated remote attacker can trigger the flaw by sending a specially crafted HTTP request to the static file server; because the redirect logic is bypassed, no prior authentication is needed. The risk is significant for publicly exposed instances, as attackers can read arbitrary configuration, source code, or other sensitive files that the web server can access.

Generated by OpenCVE AI on November 6, 2026 at 22:30 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Deploy esm.sh server version 137_7 or newer, which includes a guard against dot‑segment traversal.
  • If an upgrade cannot be applied immediately, restrict access to the CDN’s static file endpoints with firewall rules or network ACLs so that only trusted clients can reach them.
  • If feasible, temporarily disable the web.NewHandler static file server or reconfigure it to reject paths containing dot segments until the patch is in place.

Generated by OpenCVE AI on November 6, 2026 at 22:30 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 06 Nov 2026 21:00:00 +0000

Type Values Removed Values Added
Description esm.sh is a no-build content delivery network (CDN) for web development. Prior to server version 137_7, the documented web.NewHandler static file server in web/handler.go joins the URL-decoded r.URL.Path with Config.AppDir without verifying that the result remains inside the configured application directory. URL-encoded dot segments such as %2e%2e bypass the plain traversal redirect performed by Go's ServeMux, allowing an unauthenticated remote attacker to make the server open and return files outside Config.AppDir that are readable by the server process. The confirmed impact is file disclosure only, and the issue is reachable with Dev disabled. This issue is fixed in server version 137_7.
Title esm.sh: web.NewHandler allows arbitrary file read via encoded dot-segment path traversal
Weaknesses CWE-22
References
Metrics cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N'}


Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-11-06T20:49:28.708Z

Reserved: 2026-09-29T15:56:02.101Z

Link: CVE-2026-102657

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Deferred

Published: 2026-11-06T21:17:05.863

Modified: 2026-11-06T21:17:06.027

Link: CVE-2026-102657

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-11-06T22:45:12Z

Weaknesses
  • CWE-22

    Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')