{"id":"CVE-2026-129525","kind":"vulnerability","aliases":["CVE-2026-129525","GHSA-qrrc-h266-v49p"],"related":[],"title":"Issues-only members can read pull request data through /issues/{index}","description":"## Affected versions\r\n\r\nReproduced on Gitea `v1.27.1` and on `main` at commit\r\n`298d73cde6bcb36de6cc24dc436074fb0c8b1a39`.\r\n\r\n## Test setup\r\n\r\nOfficial `gitea/gitea:1.27.1` Linux container with SQLite. `INSTALL_LOCK`, the database path,\r\nand a loopback `ROOT_URL` were set only to automate installation. No security-relevant default\r\nwas changed.\r\n\r\n## Summary\r\n\r\nSeveral `/issues/{index}` API handlers load an issue or pull request from Gitea's shared index\r\nnamespace without checking which repository unit it belongs to. In a private repository, a\r\nmember with Issues access but no Pull Requests access can therefore read pull request data.\r\n\r\nThe clearest example is the timeline endpoint: for the same token and pull request,\r\n`GET /issues/{index}/timeline` returns comment bodies while the guarded sibling\r\n`GET /issues/{index}/comments` returns 404.\r\n\r\n## Root cause\r\n\r\nThe `/issues` route group is guarded by `mustEnableIssuesOrPulls`\r\n(`routers/api/v1/api.go:769` and `:1568-1668`), which allows callers who can read either unit.\r\nAfter resolving `{index}`, these handlers do not call\r\n`CanReadIssuesOrPulls(issue.IsPull)`:\r\n\r\n- `ListIssueCommentsAndTimeline` — `routers/api/v1/repo/issue_comment.go:123`\r\n- `GetIssueAttachment` and `ListIssueAttachments` —\r\n  `routers/api/v1/repo/issue_attachment.go:25` and `:74`\r\n- `ListIssueLabels` — `routers/api/v1/repo/issue_label.go:21`\r\n- `setIssueSubscription`, `CheckIssueSubscription`, and `GetIssueSubscribers` —\r\n  `routers/api/v1/repo/issue_subscription.go:106`, `:157`, and `:215`\r\n\r\nThe adjacent `ListIssueComments` handler performs the missing check at\r\n`routers/api/v1/repo/issue_comment.go:76`.\r\n\r\n## Impact\r\n\r\nAn Issues-only member can read pull request comment bodies. The other confirmed effects are\r\nlimited to attachment metadata, label associations, subscriber identities, subscription state,\r\nand setting or clearing watch state. Attachment contents, the pull request body, and inline\r\nreview comments were not exposed. Content-writing endpoints remained denied.\r\n\r\nThe attacker must already be an authenticated repository member with access through another\r\nunit.\r\n\r\n## Suggested fix\r\n\r\nAfter resolving `{index}`, call `CanReadIssuesOrPulls(issue.IsPull)` in each handler. A shared\r\nauthorized loader for issue and pull request indices would make the check harder to omit.\r\n\r\n## Relationship to prior advisories\r\n\r\nCVE-2026-27783 (GHSA-3fwp-p5rj-2pxf, fixed in `v1.26.2`) covered missing repository-unit route\r\nguards on the issue-template API. This report affects different handlers: the route admits\r\nIssues-or-Pull Requests users, but the resolved object's unit is never checked.\r\n\r\n## AI-tool disclosure\r\n\r\nI used an LLM to help identify candidate authorization gaps. I reproduced the behavior manually\r\nagainst local Gitea instances and checked the report against the source at the tested commit.\n\n---\n\n## Also covers (added by the Gitea maintainers)\n\nThe same missing `CanReadIssuesOrPulls(issue.IsPull)` check was reported in later advisories, which were closed as duplicates of this one. The fix must cover these too:\n\n- `POST` / `DELETE /repos/{owner}/{repo}/issues/{index}/reactions` (`changeIssueReaction`): a user who can read only one of the Issues / Pull Requests units can add or remove reactions on an object of the other unit.\n- `GET /repos/{owner}/{repo}/issues/{index}/times` (`ListTrackedTimes`): returns the tracked times of a pull request to an Issues-only user.\n- Web route `GET /{owner}/{repo}/issues/search?type=pulls`: returns pull request titles and bodies to an Issues-only member. The `type` / `isPull` filter has to be limited to the units the user can read, as the API's `ListIssues` already does. This route is not under the API `/issues/{index}` group, so it needs its own fix.\n- The reverse direction: a user who can read only Pull Requests can act on issues through the same handlers.","summary":"Gitea's /issues/{index} API handlers load pull requests without checking the repository unit, so a private-repo member with Issues access but no Pull Requests access can read pull request comment bodies and other metadata. An attacker needs to be an authenticated repository member with access through another unit; attachment contents, pull request bodies and inline review comments were not exposed in the report.","severity":"medium","cvss":4.3,"epss":null,"exploited":false,"exploited_at":null,"products":[{"name":"gitea.dev","fixed":["28.4.0"],"affected":"<= 28.3.0","ecosystem":"go"}],"ecosystems":["go"],"tags":["cwe-862","gitea","package","private-repos","self-hosted"],"not_affected_if":["gitea-28.4.0-or-later","no-split-unit-permissions","public-repos-only"],"how_to_check":"- Check the Gitea version with `gitea --version` or the footer of the web UI; versions `28.3.0` and earlier are affected.\n- Review which private repositories grant members Issues access without Pull Requests access, since that is the configuration the flaw needs.","fix":"- Gitea: upgrade to `28.4.0`.","status":"open","published_at":"2026-11-15T21:03:12+00:00","first_seen_at":"2026-11-15T21:12:47+00:00","triaged_at":"2026-11-15T21:14:12+00:00","updated_at":"2026-11-15T21:14:12+00:00","category":"package","confidence":0.85,"triage":{"at":"2026-11-15T21:14:12Z","model":"claude-haiku-5-5","output":{"fix":"- Gitea: upgrade to `28.4.0`.","reach":"network","title":"Gitea: Issues-only members can read pull request data via /issues","impact":"low","summary":"Gitea's /issues/{index} API handlers load pull requests without checking the repository unit, so a private-repo member with Issues access but no Pull Requests access can read pull request comment bodies and other metadata. An attacker needs to be an authenticated repository member with access through another unit; attachment contents, pull request bodies and inline review comments were not exposed in the report.","audience":"businesses","category":"package","nicknames":[],"who_cares":["gitea","self-hosted","private-repos"],"confidence":0.85,"fix_status":"available","needs_auth":"yes","worst_case":"Authenticated members read pull request comments they should not see","analyst_note":"","how_to_check":"- Check the Gitea version with `gitea --version` or the footer of the web UI; versions `28.3.0` and earlier are affected.\n- Review which private repositories grant members Issues access without Pull Requests access, since that is the configuration the flaw needs.","plain_action":"","product_name":"","needs_analyst":false,"not_affected_if":["gitea-28.4.0-or-later","no-split-unit-permissions","public-repos-only"],"who_is_affected":"Teams that self-host Gitea 28.3.0 or earlier with private repositories where some members have Issues access but not Pull Requests access can have pull request comments exposed to those members. Instances on 28.4.0 or later, or with no such split permissions, are not exposed. Managed or hosted Gitea offerings are only affected if they run a vulnerable version.","user_interaction":"no","product_ecosystem":"","needs_special_setup":"yes","severity_if_unknown":"medium"},"cost_usd":0.000899,"input_tokens":5987,"output_tokens":600,"severity_before":"medium"},"analyst_status":null,"analyst_note":null,"search":"'-129525':15A,23A '-1668':236C '-2026':14A,22A,387C '-27783':388C '-862':26B '/comments':219C '/issues':11A,37B,147C,206C,217C,225C,504C,537C,604C '/issues/search':560C '/reactions':506C '/repos':501C,534C '/timeline':208C '/times':539C '1.27.1':117C '106':273C '123':257C '1568':235C '157':274C '21':267C '215':276C '25':262C '298d73cde6bcb36de6cc24dc436074fb0c8b1a39':112C '2pxf':393C '3fwp':391C '404':221C '74':264C '76':287C '769':233C 'access':57B,62B,82B,179C,184C,350C 'act':625C 'add':469C,522C 'adjac':278C 'admit':417C 'advisori':385C,484C 'affect':101C,412C 'ai':434C 'ai-tool':433C 'allow':238C 'alreadi':343C,595C 'also':467C 'anoth':84B,352C 'api':39B,149C,409C,592C,603C 'associ':310C 'attach':86B,307C,321C 'attack':73B,341C 'authent':78B,346C 'author':367C,445C 'autom':136C 'behavior':450C 'belong':169C 'bodi':68B,90B,211C,299C,326C,568C 'call':252C,359C 'caller':239C 'candid':444C 'canreadissuesorpul':253C,360C,477C 'caus':223C 'chang':144C 'changeissuereact':507C 'check':45B,164C,284C,378C,432C,457C,479C 'checkissuesubscript':269C 'clear':318C 'clearest':192C 'close':487C 'comment':67B,94B,210C,298C,330C 'commit':111C,466C 'confirm':302C 'contain':119C 'content':87B,322C,335C 'content-writ':334C 'cover':397C,468C,496C 'cve':13A,21A,386C 'cwe':25B 'data':9A,190C 'databas':125C 'default':142C 'delet':500C 'deni':339C 'differ':413C 'direct':615C 'disclosur':436C 'duplic':489C 'effect':303C 'either':243C 'endpoint':197C,337C 'exampl':193C 'expos':97B,333C 'filter':578C 'fix':355C,394C,494C,612C 'gap':446C 'get':205C,216C,533C,557C 'getissueattach':258C 'getissuesubscrib':271C 'ghsa':17A,390C 'ghsa-3fwp-p5rj-2pxf':389C 'ghsa-qrrc-h266-v49p':16A 'gitea':27B,35B,105C,158C,454C,472C 'gitea.dev':24A 'gitea/gitea':116C 'group':227C,606C 'guard':214C,229C,403C 'h266':19A 'handler':40B,150C,249C,280C,364C,414C,631C 'harder':379C 'help':442C 'host':34B 'ident':312C 'identifi':443C 'impact':288C 'index':12A,38B,148C,161C,207C,218C,247C,358C,505C,538C,605C 'indic':374C 'inlin':92B,328C 'instal':122C,137C 'instanc':455C 'ispul':577C 'issu':2A,56B,153C,178C,291C,370C,407C,419C,517C,552C,572C,627C 'issue-templ':406C 'issue.ispull':254C,361C,478C 'issues-on':1A,290C,551C,571C 'issues-or-pul':418C 'label':309C 'later':483C 'limit':305C,582C 'linux':118C 'listissu':594C 'listissueattach':260C 'listissuecom':279C 'listissuecommentsandtimelin':255C 'listissuelabel':265C 'listtrackedtim':540C 'llm':440C 'load':41B,151C 'loader':368C 'local':453C 'lock':123C 'loopback':129C 'main':109C 'maintain':473C 'make':376C 'manual':451C 'member':4A,54B,80B,176C,293C,348C,574C 'metadata':71B,308C 'miss':283C,398C,476C 'must':342C,495C 'mustenableissuesorpul':231C 'namespac':162C 'need':74B,609C 'never':431C 'object':427C,528C 'offici':115C 'omit':381C 'one':492C,514C 'owner':502C,535C,558C 'p5rj':392C 'packag':28B 'path':126C 'perform':281C 'post':499C 'prior':384C 'privat':30B,52B,173C 'private-repo':29B,51B 'pull':7A,42B,60B,65B,88B,155C,182C,188C,203C,296C,324C,372C,421C,518C,547C,562C,564C,622C 'qrrc':18A 'reaction':525C 'read':6A,64B,187C,242C,295C,512C,589C,620C 'relationship':382C 'relev':141C 'remain':338C 'remov':524C 'repo':31B,53B,503C,536C,559C 'report':100B,411C,459C,481C 'repositori':47B,79B,166C,174C,347C,400C 'repository-unit':399C 'reproduc':103C,448C 'request':8A,43B,61B,66B,89B,156C,183C,189C,204C,297C,325C,373C,422C,519C,548C,565C,623C 'resolv':246C,357C,426C 'return':209C,220C,541C,563C 'revers':614C 'review':93B,329C 'root':130C,222C 'rout':226C,402C,416C,556C,598C 'routers/api/v1/api.go':232C 'routers/api/v1/repo/issue_attachment.go':261C 'routers/api/v1/repo/issue_comment.go':256C,286C 'routers/api/v1/repo/issue_label.go':266C 'routers/api/v1/repo/issue_subscription.go':272C 'secur':140C 'security-relev':139C 'self':33B 'self-host':32B 'set':133C,316C 'setissuesubscript':268C 'setup':114C 'sever':146C 'share':160C,366C 'sibl':215C 'sourc':462C 'sqlite':121C 'state':314C,320C 'subscrib':311C 'subscript':313C 'suggest':354C 'summari':145C 'templat':408C 'test':113C,465C 'therefor':186C 'time':544C 'timelin':196C 'titl':566C 'token':201C 'tool':435C 'track':543C 'type':561C,576C 'unit':48B,85B,167C,244C,353C,401C,429C,520C,532C,585C 'url':131C 'use':438C 'user':423C,509C,554C,587C,617C 'v1.26.2':396C 'v1.27.1':106C 'v49p':20A 'version':102C 'watch':319C 'web':555C 'without':44B,163C 'would':375C 'write':336C","nicknames":[],"mitigations":[],"who_affected":"Teams that self-host Gitea 28.3.0 or earlier with private repositories where some members have Issues access but not Pull Requests access can have pull request comments exposed to those members. Instances on 28.4.0 or later, or with no such split permissions, are not exposed. Managed or hosted Gitea offerings are only affected if they run a vulnerable version.","tier":"C","verified":{},"analyst_revisit_at":null,"fix_status":"available","audience":"businesses","plain_action":null,"pkeys":["giteadev"],"ptokens":["dev","gitea"],"labels":["cwe862","gitea","go","medium","package","privaterepos","selfhosted"],"campaign_type":null,"search_a":"'-129525':15A,23A '-2026':14A,22A '/issues':11A 'cve':13A,21A 'data':9A 'ghsa':17A 'ghsa-qrrc-h266-v49p':16A 'gitea.dev':24A 'h266':19A 'index':12A 'issu':2A 'issues-on':1A 'member':4A 'pull':7A 'qrrc':18A 'read':6A 'request':8A 'v49p':20A","search_b":"'-862':26B '/issues':37B 'access':57B,62B,82B 'anoth':84B 'api':39B 'attach':86B 'attack':73B 'authent':78B 'bodi':68B,90B 'check':45B 'comment':67B,94B 'content':87B 'cwe':25B 'expos':97B 'gitea':27B,35B 'handler':40B 'host':34B 'index':38B 'inlin':92B 'issu':56B 'load':41B 'member':54B,80B 'metadata':71B 'need':74B 'packag':28B 'privat':30B,52B 'private-repo':29B,51B 'pull':42B,60B,65B,88B 'read':64B 'repo':31B,53B 'report':100B 'repositori':47B,79B 'request':43B,61B,66B,89B 'review':93B 'self':33B 'self-host':32B 'unit':48B,85B 'without':44B","search_c":"'-1668':236C '-2026':387C '-27783':388C '/comments':219C '/issues':147C,206C,217C,225C,504C,537C,604C '/issues/search':560C '/reactions':506C '/repos':501C,534C '/timeline':208C '/times':539C '1.27.1':117C '106':273C '123':257C '1568':235C '157':274C '21':267C '215':276C '25':262C '298d73cde6bcb36de6cc24dc436074fb0c8b1a39':112C '2pxf':393C '3fwp':391C '404':221C '74':264C '76':287C '769':233C 'access':179C,184C,350C 'act':625C 'add':469C,522C 'adjac':278C 'admit':417C 'advisori':385C,484C 'affect':101C,412C 'ai':434C 'ai-tool':433C 'allow':238C 'alreadi':343C,595C 'also':467C 'anoth':352C 'api':149C,409C,592C,603C 'associ':310C 'attach':307C,321C 'attack':341C 'authent':346C 'author':367C,445C 'autom':136C 'behavior':450C 'belong':169C 'bodi':211C,299C,326C,568C 'call':252C,359C 'caller':239C 'candid':444C 'canreadissuesorpul':253C,360C,477C 'caus':223C 'chang':144C 'changeissuereact':507C 'check':164C,284C,378C,432C,457C,479C 'checkissuesubscript':269C 'clear':318C 'clearest':192C 'close':487C 'comment':210C,298C,330C 'commit':111C,466C 'confirm':302C 'contain':119C 'content':322C,335C 'content-writ':334C 'cover':397C,468C,496C 'cve':386C 'data':190C 'databas':125C 'default':142C 'delet':500C 'deni':339C 'differ':413C 'direct':615C 'disclosur':436C 'duplic':489C 'effect':303C 'either':243C 'endpoint':197C,337C 'exampl':193C 'expos':333C 'filter':578C 'fix':355C,394C,494C,612C 'gap':446C 'get':205C,216C,533C,557C 'getissueattach':258C 'getissuesubscrib':271C 'ghsa':390C 'ghsa-3fwp-p5rj-2pxf':389C 'gitea':105C,158C,454C,472C 'gitea/gitea':116C 'group':227C,606C 'guard':214C,229C,403C 'handler':150C,249C,280C,364C,414C,631C 'harder':379C 'help':442C 'ident':312C 'identifi':443C 'impact':288C 'index':148C,161C,207C,218C,247C,358C,505C,538C,605C 'indic':374C 'inlin':328C 'instal':122C,137C 'instanc':455C 'ispul':577C 'issu':153C,178C,291C,370C,407C,419C,517C,552C,572C,627C 'issue-templ':406C 'issue.ispull':254C,361C,478C 'issues-on':290C,551C,571C 'issues-or-pul':418C 'label':309C 'later':483C 'limit':305C,582C 'linux':118C 'listissu':594C 'listissueattach':260C 'listissuecom':279C 'listissuecommentsandtimelin':255C 'listissuelabel':265C 'listtrackedtim':540C 'llm':440C 'load':151C 'loader':368C 'local':453C 'lock':123C 'loopback':129C 'main':109C 'maintain':473C 'make':376C 'manual':451C 'member':176C,293C,348C,574C 'metadata':308C 'miss':283C,398C,476C 'must':342C,495C 'mustenableissuesorpul':231C 'namespac':162C 'need':609C 'never':431C 'object':427C,528C 'offici':115C 'omit':381C 'one':492C,514C 'owner':502C,535C,558C 'p5rj':392C 'path':126C 'perform':281C 'post':499C 'prior':384C 'privat':173C 'pull':155C,182C,188C,203C,296C,324C,372C,421C,518C,547C,562C,564C,622C 'reaction':525C 'read':187C,242C,295C,512C,589C,620C 'relationship':382C 'relev':141C 'remain':338C 'remov':524C 'repo':503C,536C,559C 'report':411C,459C,481C 'repositori':166C,174C,347C,400C 'repository-unit':399C 'reproduc':103C,448C 'request':156C,183C,189C,204C,297C,325C,373C,422C,519C,548C,565C,623C 'resolv':246C,357C,426C 'return':209C,220C,541C,563C 'revers':614C 'review':329C 'root':130C,222C 'rout':226C,402C,416C,556C,598C 'routers/api/v1/api.go':232C 'routers/api/v1/repo/issue_attachment.go':261C 'routers/api/v1/repo/issue_comment.go':256C,286C 'routers/api/v1/repo/issue_label.go':266C 'routers/api/v1/repo/issue_subscription.go':272C 'secur':140C 'security-relev':139C 'set':133C,316C 'setissuesubscript':268C 'setup':114C 'sever':146C 'share':160C,366C 'sibl':215C 'sourc':462C 'sqlite':121C 'state':314C,320C 'subscrib':311C 'subscript':313C 'suggest':354C 'summari':145C 'templat':408C 'test':113C,465C 'therefor':186C 'time':544C 'timelin':196C 'titl':566C 'token':201C 'tool':435C 'track':543C 'type':561C,576C 'unit':167C,244C,353C,401C,429C,520C,532C,585C 'url':131C 'use':438C 'user':423C,509C,554C,587C,617C 'v1.26.2':396C 'v1.27.1':106C 'version':102C 'watch':319C 'web':555C 'without':163C 'would':375C 'write':336C","cause_entry":null,"cause_path":null,"disclosures_checked_at":null,"first_public_at":"2026-11-15T21:03:12+00:00","kev":null,"cvss_vector":null,"cvss_by":null,"poc_count":0,"sources":[{"source":"ghsa-repo","external_id":"GHSA-qrrc-h266-v49p","url":"https://github.com/go-gitea/gitea/security/advisories/GHSA-qrrc-h266-v49p","severity":"medium","published_at":"2026-11-15T21:03:12+00:00","modified_at":"2026-11-15T21:03:12+00:00","first_seen_at":"2026-11-15T21:12:47+00:00","fetched_at":"2026-11-15T21:12:47+00:00","note":null},{"source":"nvd","external_id":"CVE-2026-129525","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-129525","severity":null,"published_at":"2026-11-15T22:17:19+00:00","modified_at":"2026-11-15T22:17:19+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":165569,"url":"https://github.com/go-gitea/gitea/security/advisories/GHSA-qrrc-h266-v49p","title":"Maintainer's advisory: github.com","kind":"vendor","source":"ghsa-repo","publisher":"vendor","text":null,"published_at":"2026-11-15T21:03:12+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"}