{"id":"CVE-2026-123065","kind":"vulnerability","aliases":["CVE-2026-123065","GHSA-4p89-xcq8-xfhm"],"related":[],"title":"Cross-repository attachment file deletion and denial of service via release edit traversal","description":"### Summary\n\nThe release edit endpoint deletes attachment files from storage using raw request parameters. Database authorization uses resolved records. Storage deletion uses unresolved input. An authenticated user with release write permission in any repository can delete arbitrary attachment files instance-wide by submitting a traversal UUID, and can cause HTTP 500 with a short UUID. Database rows are retained, causing subsequent download failures.\n\n### Details\n\nRelease attachment deletion is intended to be scoped to the release being edited. The edit form submits `attachment-del-<uuid>=true` entries. Only UUIDs attached to the edited release should result in file deletion.\r\n\r\n1. `routers/web/repo/release.go:605-617` collects raw keys without validation:\r\n\r\n```go\r\nconst delPrefix = \"attachment-del-\"\r\nfor k, v := range ctx.Repo.Form {\r\n  if strings.HasPrefix(k, delPrefix) && v[0] == \"true\" {\r\n    delAttachmentUUIDs = append(delAttachmentUUIDs, k[len(delPrefix):])\r\n  }\r\n}\r\n```\r\n\r\n2. `services/release/release.go:295-311` resolves UUIDs and enforces `ReleaseID` ownership. Traversal strings match no database row and therefore pass this check. Direct foreign UUIDs fail closed at this stage.\r\n\r\n```go\r\nattachments, err := repo_model.GetAttachmentsByUUIDs(ctx, delAttachmentUUIDs)\r\nfor _, attach := range attachments {\r\n  if attach.ReleaseID != rel.ID {\r\n    return util.NewPermissionDeniedErrorf(\"delete attachment of release permission denied\")\r\n  }\r\n```\r\n\r\n3. `services/release/release.go:350-358` deletes from storage using the raw request list, not the authorized set:\r\n\r\n```go\r\nfor _, uuid := range delAttachmentUUIDs {\r\n  if err := storage.Attachments.Delete(repo_model.AttachmentRelativePath(uuid)); err != nil {\r\n```\r\n\r\n4. `models/repo/attachment.go:56-58` performs no length or format validation:\r\n\r\n```go\r\nfunc AttachmentRelativePath(uuid string) string {\r\n  return path.Join(uuid[0:1], uuid[1:2], uuid)\r\n}\r\n```\r\n\r\nInput `a` panics at `uuid[1:2]`. Input `../../../8/f/<victim-uuid>` normalizes through `path.Join` and `modules/storage/local.go:61-62` (`FilePathJoinAbs`) to the victim path `8/f/<victim-uuid>` within the shared attachment store. `FilePathJoinAbs` (`modules/util/path.go:95-123`) prevents escape above the storage root but permits movement within it.\r\n\r\nExpected: only UUIDs resolved to the edited release are deleted from storage. Unknown values are ignored.\r\nActual: any submitted string is converted to a storage path and deleted. Traversal values resolve to other repositories files.\n\n### Impact\n\nAuthenticated users with release write permission in any repository can delete arbitrary attachment or release asset files when the target UUID is known. UUIDs are exposed through pages, APIs, and download URLs. Deletion is persistent at the storage layer while database rows remain, producing HTTP 500 on subsequent access. Short inputs cause request failure without persistent damage.\r\n\r\n### LLM usage\r\n\r\nLLM assistance used for vulnerability discovery, analysis, and drafting. Findings verified by human review against the cited source tree and live instance behavior.","summary":"The release edit form passes unvalidated attachment UUIDs straight to storage deletion, so a traversal string can point at files belonging to other repositories. An authenticated user with release write permission can delete those files and leave database rows behind, causing HTTP 500 errors on later access.","severity":"high","cvss":8.5,"epss":null,"exploited":false,"exploited_at":null,"products":[{"name":"gitea.dev","fixed":["28.4.0"],"affected":">= 1.15, <= 28.3.0","ecosystem":"go"}],"ecosystems":["go"],"tags":["cwe-22","cwe-639","git-hosting","gitea","package","self-hosted"],"not_affected_if":["fixed-version","read-only-users"],"how_to_check":"- Check the Gitea version with `gitea --version` or the admin dashboard; versions from `>= 1.15` up to `28.3.0` are affected.\n- Confirm the instance is self-hosted or otherwise under your control, since only instances running an affected version are exposed.","fix":"- Upgrade Gitea to `28.4.0`.","status":"open","published_at":"2026-11-15T21:03:04+00:00","first_seen_at":"2026-11-15T21:12:48+00:00","triaged_at":"2026-11-15T21:14:01+00:00","updated_at":"2026-11-15T21:14:01+00:00","category":"package","confidence":0.85,"triage":{"at":"2026-11-15T21:14:01Z","model":"claude-haiku-5-5","output":{"fix":"- Upgrade Gitea to `28.4.0`.","reach":"internet","title":"Gitea: release edit lets a writer delete other repositories' attachment files","impact":"high","summary":"The release edit form passes unvalidated attachment UUIDs straight to storage deletion, so a traversal string can point at files belonging to other repositories. An authenticated user with release write permission can delete those files and leave database rows behind, causing HTTP 500 errors on later access.","audience":"businesses","category":"package","nicknames":[],"who_cares":["gitea","self-hosted","git-hosting"],"confidence":0.85,"fix_status":"available","needs_auth":"yes","worst_case":"Attacker deletes arbitrary attachment files from shared storage instance-wide","analyst_note":"","how_to_check":"- Check the Gitea version with `gitea --version` or the admin dashboard; versions from `>= 1.15` up to `28.3.0` are affected.\n- Confirm the instance is self-hosted or otherwise under your control, since only instances running an affected version are exposed.","plain_action":"","product_name":"","needs_analyst":false,"not_affected_if":["fixed-version","read-only-users"],"who_is_affected":"Any Gitea instance from 1.15 through 28.3.0 where users have release write permission in at least one repository. Instances that only allow read access or that are on 28.4.0 or later are not affected.","user_interaction":"no","product_ecosystem":"","needs_special_setup":"no","severity_if_unknown":"high"},"cost_usd":0.000826,"input_tokens":5681,"output_tokens":516,"severity_before":"high"},"analyst_status":null,"analyst_note":null,"search":"'-123':351C '-123065':17A,25A '-2026':16A,24A '-22':28B '-311':221C '-358':271C '-58':299C '-617':188C '-62':336C '-639':30B '/../../8/f':329C '0':210C,315C '1':185C,316C,318C,326C '2':218C,319C,327C '295':220C '3':268C '350':270C '4':296C '4p89':20A '500':81B,137C,444C '56':298C '605':187C '61':335C '8/f':342C '95':350C 'access':85B,447C 'actual':379C 'analysi':464C 'api':427C 'append':213C 'arbitrari':122C,410C 'asset':414C 'assist':459C 'attach':4A,45B,92C,123C,152C,169C,175C,198C,248C,254C,256C,263C,346C,411C 'attach.releaseid':258C 'attachment-del':168C,197C 'attachmentrelativepath':308C 'authent':64B,111C,399C 'author':101C,282C 'behavior':480C 'behind':78B 'belong':59B 'caus':79B,135C,146C,450C 'check':238C 'cite':474C 'close':243C 'collect':189C 'const':195C 'convert':384C 'cross':2A 'cross-repositori':1A 'ctx':251C 'ctx.repo.form':204C 'cve':15A,23A 'cwe':27B,29B 'damag':455C 'databas':76B,100C,142C,232C,439C 'del':170C,199C 'delattachmentuuid':212C,214C,252C,288C 'delet':6A,50B,71B,91C,106C,121C,153C,184C,262C,272C,372C,390C,409C,431C 'delprefix':196C,208C,217C 'deni':267C 'denial':8A 'detail':150C 'direct':239C 'discoveri':463C 'download':148C,429C 'draft':466C 'edit':13A,41B,89C,163C,165C,178C,369C 'endpoint':90C 'enforc':225C 'entri':172C 'err':249C,290C,294C 'error':82B 'escap':353C 'expect':363C 'expos':424C 'fail':242C 'failur':149C,452C 'file':5A,58B,73B,93C,124C,183C,397C,415C 'filepathjoinab':337C,348C 'find':467C 'foreign':240C 'form':42B,166C 'format':304C 'func':307C 'ghsa':19A 'ghsa-4p89-xcq8-xfhm':18A 'git':32B 'git-host':31B 'gitea':34B 'gitea.dev':26A 'go':194C,247C,284C,306C 'host':33B,38B 'http':80B,136C,443C 'human':470C 'ignor':378C 'impact':398C 'input':109C,321C,328C,449C 'instanc':126C,479C 'instance-wid':125C 'intend':155C 'k':201C,207C,215C 'key':191C 'known':421C 'later':84B 'layer':437C 'leav':75B 'len':216C 'length':302C 'list':279C 'live':478C 'llm':456C,458C 'match':230C 'models/repo/attachment.go':297C 'modules/storage/local.go':334C 'modules/util/path.go':349C 'movement':360C 'nil':295C 'normal':330C 'ownership':227C 'packag':35B 'page':426C 'panic':323C 'paramet':99C 'pass':43B,236C 'path':341C,388C 'path.join':313C,332C 'perform':300C 'permiss':69B,116C,266C,404C 'permit':359C 'persist':433C,454C 'point':56B 'prevent':352C 'produc':442C 'rang':203C,255C,287C 'raw':97C,190C,277C 'record':104C 'rel.id':259C 'releas':12A,40B,67B,88C,114C,151C,161C,179C,265C,370C,402C,413C 'releaseid':226C 'remain':441C 'repo_model.attachmentrelativepath':292C 'repo_model.getattachmentsbyuuids':250C 'repositori':3A,62B,119C,396C,407C 'request':98C,278C,451C 'resolv':103C,222C,366C,393C 'result':181C 'retain':145C 'return':260C,312C 'review':471C 'root':357C 'routers/web/repo/release.go':186C 'row':77B,143C,233C,440C 'scope':158C 'self':37B 'self-host':36B 'servic':10A 'services/release/release.go':219C,269C 'set':283C 'share':345C 'short':140C,448C 'sourc':475C 'stage':246C 'storag':49B,95C,105C,274C,356C,374C,387C,436C 'storage.attachments.delete':291C 'store':347C 'straight':47B 'string':54B,229C,310C,311C,382C 'strings.hasprefix':206C 'submit':129C,167C,381C 'subsequ':147C,446C 'summari':86C 'target':418C 'therefor':235C 'travers':14A,53B,131C,228C,391C 'tree':476C 'true':171C,211C 'unknown':375C 'unresolv':108C 'unvalid':44B 'url':430C 'usag':457C 'use':96C,102C,107C,275C,460C 'user':65B,112C,400C 'util.newpermissiondeniederrorf':261C 'uuid':46B,132C,141C,174C,223C,241C,286C,293C,309C,314C,317C,320C,325C,365C,419C,422C 'v':202C,209C 'valid':193C,305C 'valu':376C,392C 'verifi':468C 'via':11A 'victim':340C 'vulner':462C 'wide':127C 'within':343C,361C 'without':192C,453C 'write':68B,115C,403C 'xcq8':21A 'xfhm':22A","nicknames":[],"mitigations":[],"who_affected":"Any Gitea instance from 1.15 through 28.3.0 where users have release write permission in at least one repository. Instances that only allow read access or that are on 28.4.0 or later are not affected.","tier":"B","verified":{},"analyst_revisit_at":null,"fix_status":"available","audience":"businesses","plain_action":null,"pkeys":["giteadev"],"ptokens":["dev","gitea"],"labels":["cwe22","cwe639","gitea","githosting","go","high","package","selfhosted"],"campaign_type":null,"search_a":"'-123065':17A,25A '-2026':16A,24A '4p89':20A 'attach':4A 'cross':2A 'cross-repositori':1A 'cve':15A,23A 'delet':6A 'denial':8A 'edit':13A 'file':5A 'ghsa':19A 'ghsa-4p89-xcq8-xfhm':18A 'gitea.dev':26A 'releas':12A 'repositori':3A 'servic':10A 'travers':14A 'via':11A 'xcq8':21A 'xfhm':22A","search_b":"'-22':28B '-639':30B '500':81B 'access':85B 'attach':45B 'authent':64B 'behind':78B 'belong':59B 'caus':79B 'cwe':27B,29B 'databas':76B 'delet':50B,71B 'edit':41B 'error':82B 'file':58B,73B 'form':42B 'git':32B 'git-host':31B 'gitea':34B 'host':33B,38B 'http':80B 'later':84B 'leav':75B 'packag':35B 'pass':43B 'permiss':69B 'point':56B 'releas':40B,67B 'repositori':62B 'row':77B 'self':37B 'self-host':36B 'storag':49B 'straight':47B 'string':54B 'travers':53B 'unvalid':44B 'user':65B 'uuid':46B 'write':68B","search_c":"'-123':351C '-311':221C '-358':271C '-58':299C '-617':188C '-62':336C '/../../8/f':329C '0':210C,315C '1':185C,316C,318C,326C '2':218C,319C,327C '295':220C '3':268C '350':270C '4':296C '500':137C,444C '56':298C '605':187C '61':335C '8/f':342C '95':350C 'access':447C 'actual':379C 'analysi':464C 'api':427C 'append':213C 'arbitrari':122C,410C 'asset':414C 'assist':459C 'attach':92C,123C,152C,169C,175C,198C,248C,254C,256C,263C,346C,411C 'attach.releaseid':258C 'attachment-del':168C,197C 'attachmentrelativepath':308C 'authent':111C,399C 'author':101C,282C 'behavior':480C 'caus':135C,146C,450C 'check':238C 'cite':474C 'close':243C 'collect':189C 'const':195C 'convert':384C 'ctx':251C 'ctx.repo.form':204C 'damag':455C 'databas':100C,142C,232C,439C 'del':170C,199C 'delattachmentuuid':212C,214C,252C,288C 'delet':91C,106C,121C,153C,184C,262C,272C,372C,390C,409C,431C 'delprefix':196C,208C,217C 'deni':267C 'detail':150C 'direct':239C 'discoveri':463C 'download':148C,429C 'draft':466C 'edit':89C,163C,165C,178C,369C 'endpoint':90C 'enforc':225C 'entri':172C 'err':249C,290C,294C 'escap':353C 'expect':363C 'expos':424C 'fail':242C 'failur':149C,452C 'file':93C,124C,183C,397C,415C 'filepathjoinab':337C,348C 'find':467C 'foreign':240C 'form':166C 'format':304C 'func':307C 'go':194C,247C,284C,306C 'http':136C,443C 'human':470C 'ignor':378C 'impact':398C 'input':109C,321C,328C,449C 'instanc':126C,479C 'instance-wid':125C 'intend':155C 'k':201C,207C,215C 'key':191C 'known':421C 'layer':437C 'len':216C 'length':302C 'list':279C 'live':478C 'llm':456C,458C 'match':230C 'models/repo/attachment.go':297C 'modules/storage/local.go':334C 'modules/util/path.go':349C 'movement':360C 'nil':295C 'normal':330C 'ownership':227C 'page':426C 'panic':323C 'paramet':99C 'pass':236C 'path':341C,388C 'path.join':313C,332C 'perform':300C 'permiss':116C,266C,404C 'permit':359C 'persist':433C,454C 'prevent':352C 'produc':442C 'rang':203C,255C,287C 'raw':97C,190C,277C 'record':104C 'rel.id':259C 'releas':88C,114C,151C,161C,179C,265C,370C,402C,413C 'releaseid':226C 'remain':441C 'repo_model.attachmentrelativepath':292C 'repo_model.getattachmentsbyuuids':250C 'repositori':119C,396C,407C 'request':98C,278C,451C 'resolv':103C,222C,366C,393C 'result':181C 'retain':145C 'return':260C,312C 'review':471C 'root':357C 'routers/web/repo/release.go':186C 'row':143C,233C,440C 'scope':158C 'services/release/release.go':219C,269C 'set':283C 'share':345C 'short':140C,448C 'sourc':475C 'stage':246C 'storag':95C,105C,274C,356C,374C,387C,436C 'storage.attachments.delete':291C 'store':347C 'string':229C,310C,311C,382C 'strings.hasprefix':206C 'submit':129C,167C,381C 'subsequ':147C,446C 'summari':86C 'target':418C 'therefor':235C 'travers':131C,228C,391C 'tree':476C 'true':171C,211C 'unknown':375C 'unresolv':108C 'url':430C 'usag':457C 'use':96C,102C,107C,275C,460C 'user':112C,400C 'util.newpermissiondeniederrorf':261C 'uuid':132C,141C,174C,223C,241C,286C,293C,309C,314C,317C,320C,325C,365C,419C,422C 'v':202C,209C 'valid':193C,305C 'valu':376C,392C 'verifi':468C 'victim':340C 'vulner':462C 'wide':127C 'within':343C,361C 'without':192C,453C 'write':115C,403C","cause_entry":null,"cause_path":null,"disclosures_checked_at":null,"first_public_at":"2026-11-15T21:03:04+00:00","kev":null,"cvss_vector":null,"cvss_by":null,"poc_count":0,"sources":[{"source":"ghsa-repo","external_id":"GHSA-4p89-xcq8-xfhm","url":"https://github.com/go-gitea/gitea/security/advisories/GHSA-4p89-xcq8-xfhm","severity":"high","published_at":"2026-11-15T21:03:04+00:00","modified_at":"2026-11-15T21:03:04+00:00","first_seen_at":"2026-11-15T21:12:48+00:00","fetched_at":"2026-11-15T21:12:48+00:00","note":null},{"source":"nvd","external_id":"CVE-2026-123065","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-123065","severity":null,"published_at":"2026-11-15T22:17:18+00:00","modified_at":"2026-11-15T22:17:18+00:00","first_seen_at":"2026-11-15T22:40:23+00:00","fetched_at":"2026-11-15T22:40:24+00:00","note":null}],"documents":[{"id":165577,"url":"https://github.com/go-gitea/gitea/security/advisories/GHSA-4p89-xcq8-xfhm","title":"Maintainer's advisory: github.com","kind":"vendor","source":"ghsa-repo","publisher":"vendor","text":null,"published_at":"2026-11-15T21:03:04+00:00","relation":"advisory","confidence":null,"note":"Maintainer's advisory: github.com"},{"id":165694,"url":"https://github.com/go-gitea/gitea/releases/tag/v28.4.0","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"}],"disclosures":[],"exploit_sources":[],"notice":"Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai"}