{"id":"CVE-2026-53980","kind":"vulnerability","aliases":["CVE-2026-53980"],"related":[],"title":"Wish Go library: git middleware path traversal lets SSH users reach other repos","description":"Charmbracelet wish before 2.0.5 contains a path traversal vulnerability in the git middleware (charm.land/wish/v2) that allows authenticated SSH users to escape the configured repository directory by supplying crafted repo paths that bypass a flawed forward-slash-count containment check in git.Middleware(). Attackers can use a single-depth path ../evil, or on Windows a payload ..\\..\\evil that defeats the slash-count guard entirely, to read or write arbitrary repositories outside the intended root via git-upload-pack, git-upload-archive, or git-receive-pack.","summary":"Charmbracelet wish, a Go library for building SSH servers, has a path traversal flaw in its git middleware. An authenticated SSH user can supply crafted repository paths to read or write Git repositories outside the configured root directory.","severity":"high","cvss":8.6,"epss":null,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["git-hosting","go","package","ssh","wish"],"not_affected_if":["no-git-middleware","unauthenticated-only-access"],"how_to_check":"- Check the version of `charm.land/wish/v2` in `go.mod` or `go list -m charm.land/wish/v2`\n- Look for `git.Middleware()` usage in your Go SSH server code","fix":"- `charm.land/wish/v2` before `2.0.5`: move to `2.0.5` or later","status":"open","published_at":"2026-11-06T15:17:22+00:00","first_seen_at":"2026-11-06T15:42:45+00:00","triaged_at":"2026-11-06T15:44:06+00:00","updated_at":"2026-11-06T15:44:06+00:00","category":"package","confidence":0.8,"triage":{"at":"2026-11-06T15:44:06Z","model":"claude-haiku-5-5","output":{"fix":"- `charm.land/wish/v2` before `2.0.5`: move to `2.0.5` or later","reach":"internet","title":"Wish Go library: git middleware path traversal lets SSH users reach other repos","impact":"high","summary":"Charmbracelet wish, a Go library for building SSH servers, has a path traversal flaw in its git middleware. An authenticated SSH user can supply crafted repository paths to read or write Git repositories outside the configured root directory.","audience":"developers","category":"package","nicknames":[],"who_cares":["go","wish","ssh","git-hosting"],"confidence":0.8,"fix_status":"available","needs_auth":"yes","worst_case":"authenticated SSH user reads or writes arbitrary repositories on the server","analyst_note":"","how_to_check":"- Check the version of `charm.land/wish/v2` in `go.mod` or `go list -m charm.land/wish/v2`\n- Look for `git.Middleware()` usage in your Go SSH server code","plain_action":"","needs_analyst":false,"not_affected_if":["no-git-middleware","unauthenticated-only-access"],"who_is_affected":"Only servers built with charm.land/wish/v2 that use the git middleware and accept SSH logins from users. Exposure depends on whether untrusted or semi-trusted users can authenticate over SSH and push or fetch repositories. Servers that do not use the git middleware are not affected.","user_interaction":"no","needs_special_setup":"yes","severity_if_unknown":"high"},"cost_usd":0.000703,"input_tokens":4380,"output_tokens":530,"severity_before":"high"},"analyst_status":null,"analyst_note":null,"search":"'-2026':15A,18A '-53980':16A,19A '/evil':117C '/wish/v2)':80C '2.0.5':68C 'allow':82C 'arbitrari':136C 'archiv':150C 'attack':109C 'authent':46B,83C 'build':33B 'bypass':98C 'charm.land':79C 'charm.land/wish/v2)':78C 'charmbracelet':27B,65C 'check':106C 'configur':62B,89C 'contain':69C,105C 'count':104C,129C 'craft':51B,94C 'cve':14A,17A 'defeat':125C 'depth':115C 'directori':64B,91C 'entir':131C 'escap':87C 'evil':123C 'flaw':40B,100C 'forward':102C 'forward-slash-count':101C 'git':4A,21B,43B,58B,76C,144C,148C,153C 'git-host':20B 'git-receive-pack':152C 'git-upload-arch':147C 'git-upload-pack':143C 'git.middleware':108C 'go':2A,23B,30B 'guard':130C 'host':22B 'intend':140C 'let':8A 'librari':3A,31B 'middlewar':5A,44B,77C 'outsid':60B,138C 'pack':146C,155C 'packag':24B 'path':6A,38B,53B,71C,96C,116C 'payload':122C 'reach':11A 'read':55B,133C 'receiv':154C 'repo':13A,95C 'repositori':52B,59B,90C,137C 'root':63B,141C 'server':35B 'singl':114C 'single-depth':113C 'slash':103C,128C 'slash-count':127C 'ssh':9A,25B,34B,47B,84C 'suppli':50B,93C 'travers':7A,39B,72C 'upload':145C,149C 'use':111C 'user':10A,48B,85C 'via':142C 'vulner':73C 'window':120C 'wish':1A,26B,28B,66C 'write':57B,135C","nicknames":[],"mitigations":[],"who_affected":"Only servers built with charm.land/wish/v2 that use the git middleware and accept SSH logins from users. Exposure depends on whether untrusted or semi-trusted users can authenticate over SSH and push or fetch repositories. Servers that do not use the git middleware are not affected.","tier":"B","verified":{},"analyst_revisit_at":null,"fix_status":"available","audience":"developers","plain_action":null,"pkeys":[],"ptokens":[],"labels":["githosting","go","high","package","ssh","wish"],"campaign_type":null,"search_a":"'-2026':15A,18A '-53980':16A,19A 'cve':14A,17A 'git':4A 'go':2A 'let':8A 'librari':3A 'middlewar':5A 'path':6A 'reach':11A 'repo':13A 'ssh':9A 'travers':7A 'user':10A 'wish':1A","search_b":"'authent':46B 'build':33B 'charmbracelet':27B 'configur':62B 'craft':51B 'directori':64B 'flaw':40B 'git':21B,43B,58B 'git-host':20B 'go':23B,30B 'host':22B 'librari':31B 'middlewar':44B 'outsid':60B 'packag':24B 'path':38B,53B 'read':55B 'repositori':52B,59B 'root':63B 'server':35B 'ssh':25B,34B,47B 'suppli':50B 'travers':39B 'user':48B 'wish':26B,28B 'write':57B","search_c":"'/evil':117C '/wish/v2)':80C '2.0.5':68C 'allow':82C 'arbitrari':136C 'archiv':150C 'attack':109C 'authent':83C 'bypass':98C 'charm.land':79C 'charm.land/wish/v2)':78C 'charmbracelet':65C 'check':106C 'configur':89C 'contain':69C,105C 'count':104C,129C 'craft':94C 'defeat':125C 'depth':115C 'directori':91C 'entir':131C 'escap':87C 'evil':123C 'flaw':100C 'forward':102C 'forward-slash-count':101C 'git':76C,144C,148C,153C 'git-receive-pack':152C 'git-upload-arch':147C 'git-upload-pack':143C 'git.middleware':108C 'guard':130C 'intend':140C 'middlewar':77C 'outsid':138C 'pack':146C,155C 'path':71C,96C,116C 'payload':122C 'read':133C 'receiv':154C 'repo':95C 'repositori':90C,137C 'root':141C 'singl':114C 'single-depth':113C 'slash':103C,128C 'slash-count':127C 'ssh':84C 'suppli':93C 'travers':72C 'upload':145C,149C 'use':111C 'user':85C 'via':142C 'vulner':73C 'window':120C 'wish':66C 'write':135C","first_public_at":"2026-11-06T15:17:22+00:00","kev":null,"cvss_vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","cvss_by":"disclosure@vulncheck.com","poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-53980","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-53980","severity":null,"published_at":"2026-11-06T15:17:22+00:00","modified_at":"2026-11-06T15:17:22+00:00","first_seen_at":"2026-11-06T15:42:45+00:00","fetched_at":"2026-11-06T15:42:45+00:00","note":null}],"documents":[{"id":87601,"url":"https://github.com/charmbracelet/wish/commit/533db0daa90446b0d4ae3284877179c37e0cc48e","title":"Patch: github.com","kind":"other","source":"nvd","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Patch: github.com"},{"id":87602,"url":"https://github.com/charmbracelet/wish/releases/tag/v2.0.5","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":87603,"url":"https://www.vulncheck.com/advisories/charmbracelet-wish-path-traversal-via-git-middleware","title":"Third-party advisory: www.vulncheck.com","kind":"advisory","source":"nvd","publisher":"research","text":null,"published_at":null,"relation":"advisory","confidence":null,"note":"Third-party advisory: www.vulncheck.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"}