{"id":"CVE-2026-102657","kind":"vulnerability","aliases":["CVE-2026-102657"],"related":[],"title":"esm.sh: path traversal lets unauthenticated users read server files","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.","summary":"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.","severity":"high","cvss":7.5,"epss":null,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["esm.sh","go","package","self-hosted"],"not_affected_if":["managed-hosting"],"how_to_check":"- Check the esm.sh server version; versions before `137_7` are affected.\n- 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.","status":"open","published_at":"2026-11-06T21:17:05+00:00","first_seen_at":"2026-11-06T21:45:07+00:00","triaged_at":"2026-11-06T21:46:38+00:00","updated_at":"2026-11-06T21:46:38+00:00","category":"package","confidence":0.8,"triage":{"at":"2026-11-06T21:46:38Z","model":"claude-haiku-5-5","output":{"fix":"- esm.sh server: upgrade to `137_7` or later.","reach":"internet","title":"esm.sh: path traversal lets unauthenticated users read server files","impact":"medium","summary":"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.","audience":"developers","category":"package","nicknames":[],"who_cares":["esm.sh","self-hosted","go"],"confidence":0.8,"fix_status":"available","needs_auth":"no","worst_case":"unauthenticated attacker reads arbitrary server-readable files","analyst_note":"","how_to_check":"- Check the esm.sh server version; versions before `137_7` are affected.\n- Confirm the server runs `web.NewHandler` for static files (the documented handler); the sources do not describe other setups.","plain_action":"","needs_analyst":false,"not_affected_if":["managed-hosting"],"who_is_affected":"Teams that self-host the esm.sh server and serve its static files through web.NewHandler are exposed to unauthenticated file reads. The sources say the issue is reachable with Dev mode disabled, so default-configured servers are in scope. Users of the public hosted esm.sh CDN are not described as affected.","user_interaction":"no","needs_special_setup":"no","severity_if_unknown":"high"},"cost_usd":0.000693,"input_tokens":4391,"output_tokens":507,"severity_before":"high"},"analyst_status":null,"analyst_note":null,"search":"'-102657':12A,15A '-2026':11A,14A '137':86C,178C '2e':54B,55B,122C,123C '7':87C,179C 'allow':134C 'app':34B,61B 'applic':113C 'attack':46B,138C 'build':74C 'bypass':124C 'cdn':78C 'check':37B 'config.appdir':103C,148C 'configur':112C 'confirm':157C 'content':75C 'cve':10A,13A 'decod':30B,100C 'deliveri':76C 'dev':169C 'develop':81C 'directori':35B,62B,114C 'disabl':170C 'disclosur':161C 'document':89C 'dot':50B,118C 'encod':49B,117C 'esm.sh':1A,16B,22B,69C 'file':9A,25B,58B,92C,146C,160C 'fix':174C 'go':17B,131C 'handler':26B 'host':21B 'impact':158C 'insid':41B,110C 'issu':165C,172C 'join':27B,96C 'let':4A 'make':140C 'network':77C 'no-build':72C 'open':143C 'outsid':59B,147C 'packag':18B 'path':2A,31B 'perform':129C 'plain':126C 'prior':82C 'process':66B,155C 'r.url.path':101C 'reachabl':167C 'read':7A,57B,68B 'readabl':151C 'redirect':128C 'remain':109C 'remot':45B,137C 'result':39B,108C 'return':145C 'segment':51B,119C 'self':20B 'self-host':19B 'servemux':133C 'server':8A,65B,84C,93C,142C,154C,176C 'static':24B,91C 'stay':40B 'travers':3A,127C 'unauthent':5A,44B,136C 'url':29B,99C,116C 'url-decod':28B,98C 'url-encod':115C 'use':48B 'user':6A 'verifi':105C 'version':85C,177C 'web':80C 'web.newhandler':90C 'web/handler.go':95C 'without':36B,104C","nicknames":[],"mitigations":[],"who_affected":"Teams that self-host the esm.sh server and serve its static files through web.NewHandler are exposed to unauthenticated file reads. The sources say the issue is reachable with Dev mode disabled, so default-configured servers are in scope. Users of the public hosted esm.sh CDN are not described as affected.","tier":"B","verified":{},"analyst_revisit_at":null,"fix_status":"available","audience":"developers","plain_action":null,"pkeys":[],"ptokens":[],"labels":["esmsh","go","high","package","selfhosted"],"campaign_type":null,"search_a":"'-102657':12A,15A '-2026':11A,14A 'cve':10A,13A 'esm.sh':1A 'file':9A 'let':4A 'path':2A 'read':7A 'server':8A 'travers':3A 'unauthent':5A 'user':6A","search_b":"'2e':54B,55B 'app':34B,61B 'attack':46B 'check':37B 'decod':30B 'directori':35B,62B 'dot':50B 'encod':49B 'esm.sh':16B,22B 'file':25B,58B 'go':17B 'handler':26B 'host':21B 'insid':41B 'join':27B 'outsid':59B 'packag':18B 'path':31B 'process':66B 'read':57B,68B 'remot':45B 'result':39B 'segment':51B 'self':20B 'self-host':19B 'server':65B 'static':24B 'stay':40B 'unauthent':44B 'url':29B 'url-decod':28B 'use':48B 'without':36B","search_c":"'137':86C,178C '2e':122C,123C '7':87C,179C 'allow':134C 'applic':113C 'attack':138C 'build':74C 'bypass':124C 'cdn':78C 'config.appdir':103C,148C 'configur':112C 'confirm':157C 'content':75C 'decod':100C 'deliveri':76C 'dev':169C 'develop':81C 'directori':114C 'disabl':170C 'disclosur':161C 'document':89C 'dot':118C 'encod':117C 'esm.sh':69C 'file':92C,146C,160C 'fix':174C 'go':131C 'impact':158C 'insid':110C 'issu':165C,172C 'join':96C 'make':140C 'network':77C 'no-build':72C 'open':143C 'outsid':147C 'perform':129C 'plain':126C 'prior':82C 'process':155C 'r.url.path':101C 'reachabl':167C 'readabl':151C 'redirect':128C 'remain':109C 'remot':137C 'result':108C 'return':145C 'segment':119C 'servemux':133C 'server':84C,93C,142C,154C,176C 'static':91C 'travers':127C 'unauthent':136C 'url':99C,116C 'url-decod':98C 'url-encod':115C 'verifi':105C 'version':85C,177C 'web':80C 'web.newhandler':90C 'web/handler.go':95C 'without':104C","first_public_at":"2026-07-24T12:14:47+00:00","kev":null,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","cvss_by":"security-advisories@github.com","poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-102657","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-102657","severity":null,"published_at":"2026-11-06T21:17:05+00:00","modified_at":"2026-11-06T21:17:06+00:00","first_seen_at":"2026-11-06T21:45:07+00:00","fetched_at":"2026-11-06T21:45:07+00:00","note":null}],"documents":[{"id":90300,"url":"https://github.com/esm-dev/esm.sh/commit/468b6b2a4b4dfec334cf6b33b01fcd4e5cd93bed","title":"Patch: github.com","kind":"other","source":"nvd","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Patch: github.com"},{"id":90301,"url":"https://github.com/esm-dev/esm.sh/commit/fc3b345e73aeaa0b7a05b6f27d91c05fdf5f9b53","title":"Patch: github.com","kind":"other","source":"nvd","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Patch: github.com"},{"id":90302,"url":"https://github.com/esm-dev/esm.sh/releases/tag/v137_7","title":"Release notes: github.com","kind":"release","source":"nvd","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Release notes: github.com"},{"id":90303,"url":"https://github.com/esm-dev/esm.sh/security/advisories/GHSA-g3c2-rjq2-c763","title":"Vendor advisory: github.com","kind":"vendor","source":"nvd","publisher":"vendor","text":null,"published_at":"2026-07-24T12:14:47+00:00","relation":"advisory","confidence":null,"note":"Vendor advisory: github.com"}],"exploit_sources":[],"notice":"Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai"}