Skip to main content

esm.sh CVE-2026-102657

| EUVDEUVD-2026-118494 HIGH
Path Traversal (CWE-22)
2026-11-06 GitHub_M GHSA-g3c2-rjq2-c763
7.5
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

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

  1. Access
    Send GET request with %2e%2e-encoded path
  2. Delivery
    ServeMux decodes and forwards path to handler
  3. Exploit
    filepath.Join(AppDir, path) escapes app directory
  4. Execution
    os.Open reads out-of-root file
  5. Impact
    Server returns file contents to attacker

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 run the documented web.NewHandler static file server (web/handler.go) exposed network-facing, as shown in web/README.md using http.Handle("GET /", web.NewHandler(web.Config{AppDir: ..., Dev: false})). No authentication, user interaction, or non-default handler configuration is needed, and the issue reproduces with Dev disabled (Dev:false), so default network-facing deployments of this handler are exploitable by unauthenticated remote attackers. The trigger is specifically URL-encoded dot-segments (e.g. %2e%2e) that bypass Go ServeMux's plain-/../ redirect. LIMITS on exploitation: the attacker can only read files that are outside Config.AppDir but readable by the server process (no write primitive or code execution was confirmed), and the risk applies only where the web.NewHandler component is actually deployed as an internet- or network-reachable service - applications not using this handler are unaffected.

Impact

The CVSS 3.1 base score of 7.5 (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N) reflects an easily triggered flaw: network-reachable, low attack complexity, no privileges and no user interaction, with high confidentiality impact but no integrity or availability impact - consistent with a confirmed file-disclosure-only primitive (CWE-22). The signals are mostly aligned toward real but bounded risk: a detailed, locally reproduced proof of concept is published in the GitHub Security Advisory (GHSA-g3c2-rjq2-c763), and vuln.today assigns a 'this_week' priority, indicating prompt but non-emergency handling. Countervailing factors temper this: the vulnerability is NOT in CISA KEV (no confirmed active exploitation), no EPSS probability was provided (so likelihood of in-the-wild exploitation cannot be quantified), and exploitation requires that the specific documented web.NewHandler static file server actually be deployed network-facing. Net: this is a genuine, easy-to-exploit unauthenticated information-disclosure bug for affected deployments, not a low-real-risk high-CVSS artifact, but its blast radius is gated by how widely the vulnerable handler is actually exposed rather than by exploit difficulty. EPSS is absent, so probability-of-exploitation scoring could not be cross-referenced.

Exploit ScenarioDerived

An unauthenticated remote attacker sends an HTTP GET request whose path contains URL-encoded dot-segments (e.g. /%2e%2e/%2e%2e/secret.txt) to a server running the documented web.NewHandler static file server. Go's ServeMux redirects plain /../ paths but forwards the decoded encoded-traversal path to the handler, which joins it with Config.AppDir and returns the contents of files outside the app directory that are readable by the server process. A reproducible proof of concept with observed vulnerable output (status=200 returning an out-of-directory secret file) is published in the GHSA advisory.

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

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

Alert me

AnalysisAIv1 – Nov 06, 2026

Unauthenticated path traversal in esm.sh's documented web.NewHandler static file server (server builds prior to 137_7) lets a remote attacker read files outside the configured Config.AppDir by supplying URL-encoded dot-segments such as %2e%2e in the request path. The CVSS 3.1 score is 7.5 (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N) - network reachable, no privileges or user interaction, high confidentiality impact only; the confirmed impact is file disclosure, with no write primitive or code execution demonstrated. The advisory includes a proof-of-concept that the reporter states reproduced the disclosure locally; it is not verified as working exploit code, and there is no CISA KEV entry or confirmed active exploitation. Exposure is limited to deployments that actually serve web.NewHandler network-facing, and it reproduces with Dev disabled.

RemediationAI

Upgrade the esm.sh server to version 137_7 (release tag v137_7), which is the version the advisory states contains the fix; the corresponding changes are in pull request esm-dev/esm.sh#1376 and commits 468b6b2a4b4dfec334cf6b33b01fcd4e5cd93bed and fc3b345e73aeaa0b7a05b6f27d91c05fdf5f9b53 (https://github.com/esm-dev/esm.sh/releases/tag/v137_7, https://github.com/esm-dev/esm.sh/security/advisories/GHSA-g3c2-rjq2-c763). If upgrading immediately is not possible, the most direct compensating control is to stop exposing web.NewHandler on a network-facing listener - bind it to localhost or place it behind an authenticating reverse proxy - which removes the CVSS AV:N attack path entirely at the cost of losing the documented public static-file setup. A reverse proxy or WAF rule that rejects request paths containing encoded dot-segments (%2e%2e in any case variation) or double-encoded variants blocks the demonstrated trigger, but it is a signature-based measure that must also cover path-normalization edge cases and will not help if traffic bypasses the proxy. Additionally, run the server process with the least privilege and directory read access possible, since the flaw only discloses files the process itself can read; this reduces the blast radius (source, configs, keys, credentials in ancestor or sibling directories) but does not fix the traversal. Upstream guidance for custom forks is to reject NUL bytes, canonicalize with path.Clean("/" + r.URL.EscapedPath()), strip the leading slash, reject non-local results with filepath.IsLocal, join only the validated relative path to AppDir, and define an explicit symlink policy, with regression tests for /%2e%2e/secret.txt and multi-level encoded traversal.

Affected VersionsENISA

esm.sh < 137_7

Affected Packages

go github.com/esm-dev/esm.sh fix: 0.2.0
go github.com/esm-dev/esm.sh/web fix: 0.2.0
euvd esm_sh fix: 137_7

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 3 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

The flaw is CWE-22 (Improper Limitation of a Pathname to a Restricted Directory) in Go code. Go's net/http ServeMux issues a 307 redirect for plain dot-segment request paths such as /../secret.txt, but it decodes percent-encoded segments into r.URL.Path before dispatching, so /%2e%2e/secret.txt arrives at the handler as "/../secret.txt". The handler in web/handler.go takes r.URL.Path and calls filepath.Join(s.config.AppDir, pathname), then runs os.Lstat and later os.Open plus io.Copy on the result for non-HTML/static files. Because filepath.Join cleans the joined string rather than confining it, joining "/tmp/root/app" with "/../secret.txt" resolves to "/tmp/root/secret.txt". No filepath.IsLocal check, cleaned-relative-path validation, absolute-root prefix comparison, or symlink-aware containment check exists before the file is opened, so the server returns any file outside AppDir that the server process can read. The advisory notes the same unsafe join pattern appears in other handler code paths, but the static file read path alone is sufficient to prove arbitrary file disclosure. Affected package: go/github.com/esm-dev/esm.sh/web (web package version v0.1.0 as recorded in web/release.go, commit 48d76b947d1f3185b3a7a9af4cdcaf02c263d938).

Know when Esm Sh gets its next vulnerability

  • 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 (GitHub_M) PRIMARY 7.5 HIGH
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
vuln.today AI 7.5 HIGH

Unauthenticated network request with encoded traversal (AV:N/AC:L/PR:N/UI:N); confirmed arbitrary file read gives C:H, with no write or DoS primitive so I:N/A:N and S:U.

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

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None

Lifecycle Timeline

2
Patch available
Nov 06, 2026 - 22:03 EUVD
CVE Published
Nov 06, 2026 - 20:49 cve.org
HIGH 7.5

DescriptionCVE.org

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.

Technical POC Analysis

CWE-22 (Improper Limitation of a Pathname to a Restricted Directory).

Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.

Latest POC

1 public PoC link from nuclei

Sign in to open the public PoC links collected for this CVE.

Executive ViewAI

Why It Matters

CVE-2026-102657 is a high-severity unauthenticated path traversal vulnerability in the esm.sh static file server component, potentially allowing remote attackers to read arbitrary files outside the intended directory. This could lead to disclosure of sensitive configuration, source code, or credential files, impacting organizations that expose the esm.sh web handler to network traffic. Leadership should prioritize remediation due to the high confidentiality impact and lack of authentication required.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations include restricting network access to the esm.sh web handler, implementing WAF rules to block path traversal patterns, and conducting regular security audits of exposed services.

Threat Model

4 threats: Information Disclosure, Spoofing, Elevation of Privilege and 1 more

5-step attack chain with trust boundaries and controls

Full threat model - attack chain, trust boundaries, controls per stage and evidence - is part of the Pro and Business plans.

Threat Intelligence Overview

EPSS Score
0.7%
Top 46% exploitable
Prevalence
Low
niche self-hosted esm.sh web.NewHandler static server; limited network-facing production footprint
Threat Intel
1
1 sources
Social Media
1
Sightings
Data Quality
5 sources
Confidence: Medium

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 Yes
EPSS 0.7%
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
Poc
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
High

Priority Score

59
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +38
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.

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