{"id":"CVE-2026-118535","kind":"vulnerability","aliases":["CVE-2026-118535","GHSA-q3q9-39vr-q35j"],"related":[],"title":"Repository transfer preserves owner-scoped workflow trust, allowing the new owner to access unrelated repositories' secrets and write token","description":"### Summary\n\nGitea does not revoke an owner-scoped workflow source registration when the source repository is transferred outside that owner. Registration initially requires the source to belong to the organization or user, but later dispatch uses only its stable repository ID and does not revalidate ownership. The source's new owner can replace its workflow content. A subsequent event in another repository belonging to the original scope runs that attacker-controlled workflow with the consumer's plaintext Actions secrets and `GITEA_TOKEN`. On Gitea 28.1.0, this exposed a synthetic secret and produced a token that successfully wrote to a private consumer the attacker otherwise received HTTP 404 for.\r\n\r\n\n\n### Details\n\n`ActionScopedWorkflowSource` stores the consuming scope's `OwnerID` and the source's stable `SourceRepoID`. Owner-level enrollment only resolves repositories currently owned by that owner. Transfer changes the source owner but leaves this row intact, and dispatch loads the source by ID without checking its new owner.\r\n\r\nThis appears to be a missed lifecycle check rather than ordinary transfer behavior: repository deletion removes scoped-source rows, and transfer already removes the repository from the old owner's Actions `AllowedCrossRepoIDs`. A source transferred outside an organization also could not be freshly registered at that organization's owner scope. Nevertheless, the old trust silently remains and grants the new owner code execution in the original scope's consumer context.\r\n\n\nExpected behavior: transferring a registered source outside the organization should revoke or suspend its owner-scoped trust and require explicit re-registration.\r\n\r\nActual behavior: the registration survives, allowing the source's new owner to supply workflow code that runs with unrelated repositories' secrets and task token.\r\n\n\n### Impact\n\nAn attacker who gains ownership of a transferred scoped-workflow source can steal Actions secrets and use the `GITEA_TOKEN` to modify private repositories they cannot otherwise access. This can expose deployment credentials and compromise repositories across the source’s former organization.","summary":"After a repository registered as an owner-scoped workflow source is transferred outside that owner, Gitea keeps trusting it. Its new owner can supply workflow code that runs with other repositories' Actions secrets and a write-capable GITEA_TOKEN.","severity":"high","cvss":7.3,"epss":null,"exploited":false,"exploited_at":null,"products":[{"name":"gitea.dev","fixed":["28.4.0"],"affected":">= 1.27.0, <= 28.3.0","ecosystem":"go"}],"ecosystems":["go"],"tags":["cwe-863","gitea","github-actions","package","secrets","self-hosted"],"not_affected_if":["default-config","no-scoped-workflow-sources"],"how_to_check":"- Run `gitea --version` and compare against the affected range `>= 1.27.0, <= 28.3.0`.\n- Check whether owner-scoped Actions workflow sources are used at the organization or user level.\n- Review repositories transferred out of an organization that were registered as scoped workflow sources.","fix":"- Gitea: upgrade to `28.4.0`.","status":"open","published_at":"2026-11-15T21:03:08+00:00","first_seen_at":"2026-11-15T21:12:48+00:00","triaged_at":"2026-11-15T21:14:08+00:00","updated_at":"2026-11-15T21:14:08+00:00","category":"package","confidence":0.85,"triage":{"at":"2026-11-15T21:14:08Z","model":"claude-haiku-5-5","output":{"fix":"- Gitea: upgrade to `28.4.0`.","reach":"network","title":"Gitea: repository transfer keeps workflow trust, exposing other repos' secrets","impact":"high","summary":"After a repository registered as an owner-scoped workflow source is transferred outside that owner, Gitea keeps trusting it. Its new owner can supply workflow code that runs with other repositories' Actions secrets and a write-capable GITEA_TOKEN.","audience":"businesses","category":"package","nicknames":[],"who_cares":["gitea","self-hosted","github-actions","secrets"],"confidence":0.85,"fix_status":"available","needs_auth":"yes","worst_case":"Attacker runs workflows that steal Actions secrets and write private repositories","analyst_note":"","how_to_check":"- Run `gitea --version` and compare against the affected range `>= 1.27.0, <= 28.3.0`.\n- Check whether owner-scoped Actions workflow sources are used at the organization or user level.\n- Review repositories transferred out of an organization that were registered as scoped workflow sources.","plain_action":"","product_name":"","needs_analyst":false,"not_affected_if":["default-config","no-scoped-workflow-sources"],"who_is_affected":"Teams running self-hosted Gitea 1.27.0 through 28.3.0 that use owner-scoped Actions workflow sources. Exposure requires a registered source repository to leave the owning organization or user; instances without scoped workflow sources are not affected. Teams on other versions, or not using scoped workflow sources, can skip it.","user_interaction":"no","product_ecosystem":"","needs_special_setup":"yes","severity_if_unknown":"unknown"},"cost_usd":0.00082,"input_tokens":5224,"output_tokens":596,"severity_before":"high"},"analyst_status":null,"analyst_note":null,"search":"'-118535':23A,31A '-2026':22A,30A '-863':34B '28.1.0':171C '39vr':27A '404':193C 'access':14A,391C 'across':400C 'action':38B,76B,164C,274C,377C 'actionscopedworkflowsourc':196C 'actual':338C 'allow':9A,343C 'allowedcrossrepoid':275C 'alreadi':265C 'also':282C 'anoth':146C 'appear':244C 'attack':156C,189C,364C 'attacker-control':155C 'behavior':255C,315C,339C 'belong':112C,148C 'cannot':389C 'capabl':82B 'chang':222C 'check':239C,250C 'code':70B,305C,352C 'compromis':398C 'consum':161C,187C,199C,312C 'content':141C 'context':313C 'control':157C 'could':283C 'credenti':396C 'current':216C 'cve':21A,29A 'cwe':33B 'delet':257C 'deploy':395C 'detail':195C 'dispatch':120C,232C 'enrol':212C 'event':144C 'execut':306C 'expect':314C 'explicit':334C 'expos':173C,394C 'former':404C 'fresh':286C 'gain':366C 'ghsa':25A 'ghsa-q3q9-39vr-q35j':24A 'gitea':35B,60B,83B,86C,167C,170C,382C 'gitea.dev':32A 'github':37B 'github-act':36B 'grant':301C 'host':43B 'http':192C 'id':126C,237C 'impact':362C 'initi':107C 'intact':230C 'keep':61B 'later':119C 'leav':227C 'level':211C 'lifecycl':249C 'load':233C 'miss':248C 'modifi':385C 'nevertheless':294C 'new':11A,65B,135C,241C,303C,347C 'old':271C,296C 'ordinari':253C 'organ':115C,281C,290C,322C,405C 'origin':151C,309C 'otherwis':190C,390C 'outsid':57B,103C,279C,320C 'own':217C 'owner':5A,12A,51B,59B,66B,92C,105C,136C,210C,220C,225C,242C,272C,292C,304C,329C,348C 'owner-level':209C 'owner-scop':4A,50B,91C,328C 'ownerid':202C 'ownership':131C,367C 'packag':39B 'plaintext':163C 'preserv':3A 'privat':186C,386C 'produc':178C 'q35j':28A 'q3q9':26A 'rather':251C 're':336C 're-registr':335C 'receiv':191C 'regist':47B,287C,318C 'registr':96C,106C,337C,341C 'remain':299C 'remov':258C,266C 'replac':138C 'repositori':1A,16A,46B,75B,100C,125C,147C,215C,256C,268C,357C,387C,399C 'requir':108C,333C 'resolv':214C 'revalid':130C 'revok':89C,324C 'row':229C,262C 'run':72B,153C,354C 'scope':6A,52B,93C,152C,200C,260C,293C,310C,330C,372C 'scoped-sourc':259C 'scoped-workflow':371C 'secret':17A,40B,77B,165C,176C,358C,378C 'self':42B 'self-host':41B 'silent':298C 'sourc':54B,95C,99C,110C,133C,205C,224C,235C,261C,277C,319C,345C,374C,402C 'sourcerepoid':208C 'stabl':124C,207C 'steal':376C 'store':197C 'subsequ':143C 'success':182C 'summari':85C 'suppli':68B,350C 'surviv':342C 'suspend':326C 'synthet':175C 'task':360C 'token':20A,84B,168C,180C,361C,383C 'transfer':2A,56B,102C,221C,254C,264C,278C,316C,370C 'trust':8A,62B,297C,331C 'unrel':15A,356C 'use':121C,380C 'user':117C 'without':238C 'workflow':7A,53B,69B,94C,140C,158C,351C,373C 'write':19A,81B 'write-cap':80B 'wrote':183C","nicknames":[],"mitigations":[],"who_affected":"Teams running self-hosted Gitea 1.27.0 through 28.3.0 that use owner-scoped Actions workflow sources. Exposure requires a registered source repository to leave the owning organization or user; instances without scoped workflow sources are not affected. Teams on other versions, or not using scoped workflow sources, can skip it.","tier":"B","verified":{},"analyst_revisit_at":null,"fix_status":"available","audience":"businesses","plain_action":null,"pkeys":["giteadev"],"ptokens":["dev","gitea"],"labels":["cwe863","gitea","githubactions","go","high","package","secrets","selfhosted"],"campaign_type":null,"search_a":"'-118535':23A,31A '-2026':22A,30A '39vr':27A 'access':14A 'allow':9A 'cve':21A,29A 'ghsa':25A 'ghsa-q3q9-39vr-q35j':24A 'gitea.dev':32A 'new':11A 'owner':5A,12A 'owner-scop':4A 'preserv':3A 'q35j':28A 'q3q9':26A 'repositori':1A,16A 'scope':6A 'secret':17A 'token':20A 'transfer':2A 'trust':8A 'unrel':15A 'workflow':7A 'write':19A","search_b":"'-863':34B 'action':38B,76B 'capabl':82B 'code':70B 'cwe':33B 'gitea':35B,60B,83B 'github':37B 'github-act':36B 'host':43B 'keep':61B 'new':65B 'outsid':57B 'owner':51B,59B,66B 'owner-scop':50B 'packag':39B 'regist':47B 'repositori':46B,75B 'run':72B 'scope':52B 'secret':40B,77B 'self':42B 'self-host':41B 'sourc':54B 'suppli':68B 'token':84B 'transfer':56B 'trust':62B 'workflow':53B,69B 'write':81B 'write-cap':80B","search_c":"'28.1.0':171C '404':193C 'access':391C 'across':400C 'action':164C,274C,377C 'actionscopedworkflowsourc':196C 'actual':338C 'allow':343C 'allowedcrossrepoid':275C 'alreadi':265C 'also':282C 'anoth':146C 'appear':244C 'attack':156C,189C,364C 'attacker-control':155C 'behavior':255C,315C,339C 'belong':112C,148C 'cannot':389C 'chang':222C 'check':239C,250C 'code':305C,352C 'compromis':398C 'consum':161C,187C,199C,312C 'content':141C 'context':313C 'control':157C 'could':283C 'credenti':396C 'current':216C 'delet':257C 'deploy':395C 'detail':195C 'dispatch':120C,232C 'enrol':212C 'event':144C 'execut':306C 'expect':314C 'explicit':334C 'expos':173C,394C 'former':404C 'fresh':286C 'gain':366C 'gitea':86C,167C,170C,382C 'grant':301C 'http':192C 'id':126C,237C 'impact':362C 'initi':107C 'intact':230C 'later':119C 'leav':227C 'level':211C 'lifecycl':249C 'load':233C 'miss':248C 'modifi':385C 'nevertheless':294C 'new':135C,241C,303C,347C 'old':271C,296C 'ordinari':253C 'organ':115C,281C,290C,322C,405C 'origin':151C,309C 'otherwis':190C,390C 'outsid':103C,279C,320C 'own':217C 'owner':92C,105C,136C,210C,220C,225C,242C,272C,292C,304C,329C,348C 'owner-level':209C 'owner-scop':91C,328C 'ownerid':202C 'ownership':131C,367C 'plaintext':163C 'privat':186C,386C 'produc':178C 'rather':251C 're':336C 're-registr':335C 'receiv':191C 'regist':287C,318C 'registr':96C,106C,337C,341C 'remain':299C 'remov':258C,266C 'replac':138C 'repositori':100C,125C,147C,215C,256C,268C,357C,387C,399C 'requir':108C,333C 'resolv':214C 'revalid':130C 'revok':89C,324C 'row':229C,262C 'run':153C,354C 'scope':93C,152C,200C,260C,293C,310C,330C,372C 'scoped-sourc':259C 'scoped-workflow':371C 'secret':165C,176C,358C,378C 'silent':298C 'sourc':95C,99C,110C,133C,205C,224C,235C,261C,277C,319C,345C,374C,402C 'sourcerepoid':208C 'stabl':124C,207C 'steal':376C 'store':197C 'subsequ':143C 'success':182C 'summari':85C 'suppli':350C 'surviv':342C 'suspend':326C 'synthet':175C 'task':360C 'token':168C,180C,361C,383C 'transfer':102C,221C,254C,264C,278C,316C,370C 'trust':297C,331C 'unrel':356C 'use':121C,380C 'user':117C 'without':238C 'workflow':94C,140C,158C,351C,373C 'wrote':183C","cause_entry":null,"cause_path":null,"disclosures_checked_at":null,"first_public_at":"2026-11-15T21:03:08+00:00","kev":null,"cvss_vector":null,"cvss_by":null,"poc_count":0,"sources":[{"source":"ghsa-repo","external_id":"GHSA-q3q9-39vr-q35j","url":"https://github.com/go-gitea/gitea/security/advisories/GHSA-q3q9-39vr-q35j","severity":"high","published_at":"2026-11-15T21:03:08+00:00","modified_at":"2026-11-15T21:03:08+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-118535","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-118535","severity":null,"published_at":"2026-11-15T22:17:17+00:00","modified_at":"2026-11-15T22:17:17+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":165573,"url":"https://github.com/go-gitea/gitea/security/advisories/GHSA-q3q9-39vr-q35j","title":"Maintainer's advisory: github.com","kind":"vendor","source":"ghsa-repo","publisher":"vendor","text":null,"published_at":"2026-11-15T21:03:08+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"}