---
id: "CVE-2026-102657"
page: "https://infrastack.ai/live/CVE-2026-102657"
kind: "vulnerability"
aliases: ["CVE-2026-102657"]
title: "esm.sh: path traversal lets unauthenticated users read server files"
severity: "high"
cvss: 7.5
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["esm.sh", "go", "package", "self-hosted"]
not_affected_if: ["managed-hosting"]
published_at: "2026-11-06T21:17:05+00:00"
first_seen_at: "2026-11-06T21:45:07+00:00"
updated_at: "2026-11-06T21:46:38+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-102657", "first_seen_at": "2026-11-06T21:45:07+00:00"}]
exploit_sources: []
---

# esm.sh: path traversal lets unauthenticated users read server files

Link for people: https://infrastack.ai/live/CVE-2026-102657 (this .md is for agents)

esm.sh's static file handler joins URL-decoded paths to the app directory without checking the result stays inside it. An unauthenticated remote attacker can use encoded dot segments such as %2e%2e to read files outside the app directory that the server process can read.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check the esm.sh server version; versions before `137_7` are affected.
- Confirm the server runs `web.NewHandler` for static files (the documented handler); the sources do not describe other setups.

## Fix

- esm.sh server: upgrade to `137_7` or later.

## Timeline

- 2026-11-06T21:45:07+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-102657

## Documents

- [advisory] Vendor advisory: github.com https://github.com/esm-dev/esm.sh/security/advisories/GHSA-g3c2-rjq2-c763
- [fix] Patch: github.com https://github.com/esm-dev/esm.sh/commit/468b6b2a4b4dfec334cf6b33b01fcd4e5cd93bed
- [fix] Patch: github.com https://github.com/esm-dev/esm.sh/commit/fc3b345e73aeaa0b7a05b6f27d91c05fdf5f9b53
- [fix] Release notes: github.com https://github.com/esm-dev/esm.sh/releases/tag/v137_7

## From the sources

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.

---

_Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai_
