{"id":"CVE-2026-128365","kind":"vulnerability","aliases":["CVE-2026-128365","GHSA-74jf-6hjp-549c"],"related":[],"title":"RemoveTeamReviewRequest treats team id 2 as Actions user, bypassing approvals","description":"A user with write access to an organization repository can merge their own pull request into a branch protected by \"required approvals\" without any human review. They approve the PR with an Actions job token, then request and withdraw a review from the team whose id is 2, which turns the `gitea-actions` approval into an official one. This only affects the one organization on the instance that owns team id 2, and only when that team counts as an official reviewer for the branch (write access to code, or listed in the approvals whitelist). The attacker does not need to be a member of that team.\n\nThe bug is in `RemoveTeamReviewRequest` (`models/issues/review.go`, around lines 895–912). When a team review request is withdrawn, it looks up \"the latest review of the team\" with `GetReviewByIssueIDAndUserID(ctx, issue.ID, -reviewer.ID)` and sets `official=true` on whatever row it finds. No review is ever stored under a negated team id. Negative reviewer ids are system users, though, and `ActionsUserID = -2` is the identity behind every Actions job token. Any job token, including one from a runner the attacker registers on their own repository, can read a public repository and post a review. That review is normally stored as `official=false` and does not count toward required approvals. Once the team 2 request is withdrawn, `GetGrantedApprovalsCount` counts it and the merge goes through. The gain is limited to one approval per pull request, and the PR visibly shows `gitea-actions` as its reviewer.\n\nThe attached reproducer runs a default sqlite instance. The merge is refused with `405 Does not have enough approvals`, still refused after withdrawing an otherwise identical team with id 3, and accepted with `200` after withdrawing team id 2. A user with no access to the organization can flip the flag the same way from a fork PR, but cannot merge it themselves. The lookup dates from v1.13.0 and was harmless until the Actions user (id -2) arrived in 4011821c946e, first released in v1.19.0.\n\n## Details\n\nScanned commit `31626de2a6cdd3e1fe93216e4ac80f511297f1e7`, default configuration. Attacker: a regular user with write access\nto an organization repository whose protected branch requires approvals. Entry point:\n`DELETE /api/v1/repos/{owner}/{repo}/pulls/{index}/requested_reviewers` (or the web form `POST /{owner}/{repo}/issues/request_review`).\n\nWhen a team review request is withdrawn, `RemoveTeamReviewRequest` tries to restore \"the latest official review from that\nteam\" and looks it up under the reviewer id `-team.ID`:\n\n```go\n// models/issues/review.go:895\nofficial, err := IsOfficialReviewerTeam(ctx, issue, reviewer)\n…\nif official {\n\t// recalculate which is the latest official review from that team\n\treview, err := GetReviewByIssueIDAndUserID(ctx, issue.ID, -reviewer.ID)\n\t…\n\tif review != nil {\n\t\tif _, err := db.Exec(ctx, \"UPDATE `review` SET official=? WHERE id=?\", true, review.ID); err != nil {\n```\n\nNo review is ever stored with `reviewer_id = -teamID`: a team request is a row with `reviewer_team_id` set\n(`AddTeamReviewRequest`, `models/issues/review.go:848`), and reviews by team members carry the member's own id. Negative\n`reviewer_id` values do exist, though. They are the system users of `models/user/user_system.go:49-54`, and\n`ActionsUserID = -2` is the doer behind every Actions job token. For the team with id 2 the lookup therefore returns the\nlatest approve/reject/request review of `gitea-actions` on that pull request, and the `UPDATE` marks it official. The\ncondition checked before it (`IsOfficialReviewerTeam`) is about the team, not about the author of the row being updated.\n\nOn a running instance: a pull request approved only by a job token is refused with `405 Does not have enough approvals`;\nafter its author requests and withdraws a review from the team with id 2, the same merge returns `200`.\n\n### The path\n\n`mallory` is a member of a team with write access in the organization `acme`. `acme/app` is public and its `main` branch\nhas a protection rule with `required_approvals: 1`. The team `developers` has id 2.\n\n1. `mallory` opens pull request #1 from a branch of `acme/app`.\n\n2. `mallory` obtains an Actions job token. All job tokens act as user -2, so any one will do; the simplest source is a\n   repository of `mallory`'s own with a runner registered for it (`POST /api/v1/repos/mallory/mine/actions/runners/registration-token`).\n   A job token gets read access to other public repositories (`GetActionsUserRepoPermission`,\n   `models/perm/access/repo_permission.go:337-367`).\n\n3. With the job token `mallory` sends `POST /api/v1/repos/acme/app/pulls/1/reviews {\"event\":\"APPROVED\"}`. The route needs\n   `reqToken()` and read access to code (`routers/api/v1/api.go:1515-1517`, group guards at `:1535`). `SubmitReview`\n   decides the `official` flag with `IsOfficialReviewer` (`models/issues/review.go:494`), which ends in\n   `IsUserOfficialReviewer` → `HasAccessUnit(…, unit.TypeCode, AccessModeWrite)` (`models/git/protected_branch.go:264-276`).\n   That helper evaluates user -2 as a plain user without write access, so the review is stored with `official=false` and\n   the merge is refused. Up to here everything works as intended.\n\n4. `mallory` sends `POST` and then `DELETE /api/v1/repos/acme/app/pulls/1/requested_reviewers {\"team_reviewers\":[\"developers\"]}`.\n   Both go through `apiReviewRequest` (`routers/api/v1/repo/pull_review.go:867`) to `issue_service.TeamReviewRequest`\n   (`services/issue/review_request.go:180`). Its only check, `isValidTeamReviewRequest`, accepts the poster of the pull\n   request (`CanDoerChangeReviewRequests`, `services/issue/review_request.go:240`). The `DELETE` reaches the code quoted\n   above. `IsOfficialReviewerTeam` (`models/issues/review.go:308`) is true because the team has write access to code (with\n   an approvals whitelist enabled it is true when the team is on the whitelist). The lookup with `-2` finds the bot's\n   approval and sets `official=true`.\n\n5. `GetGrantedApprovalsCount` (`models/issues/pull.go:770`) counts rows with `type=approve AND official=true`, now finds\n   one, and `POST /api/v1/repos/acme/app/pulls/1/merge` succeeds.\n\nDoing step 4 with a second team that has the same permissions and members but id 3 leaves the review at `official=false`\nand the merge refused, which isolates the id collision as the cause.\n\nThe web handler `UpdatePullReviewRequest` (`routers/web/repo/pull_review.go:385-399`, form fields `id=-2&action=detach`)\ncalls the same `TeamReviewRequest`; that route was read, not exercised.\n\nThe block dates from team review requests (`8be3e439c2b3`, \"Add team support for review request (#12039)\", 2020-10-13),\nwhen no review could carry a negative reviewer id. It became harmful with the Actions user id -2, introduced in\n`4011821c946e` (\"Implement actions (#21937)\", 2023-01-31), first released in v1.19.0 (Actions became enabled by\ndefault in v1.21.0). This is from reading the history; older trees could not be built to bisect.\n\n## Impact\n\nA user with write access who is subject to \"required approvals\" merges their own change into the protected branch with no\nreviewer involved. The pull request shows a single approval, by `gitea-actions`.\n\nThe precondition that limits this is the id: the team must have id 2, the only negated team id that is a system user able\nto submit reviews. Team ids are instance-wide and sequential, so this is the second team ever created on the instance,\nand exactly one organization owns it. On an instance with a single organization that is usually the first team created\nafter `Owners`; if a second organization was created before any custom team, it is that organization's `Owners` team.\nThe team has to count as an official reviewer team for the branch (write access to code, or listed in the\napprovals whitelist); the attacker does not need to be a member of it. Organizations that do not own team 2 are not\naffected. Both points were checked in a separate run: with `acme/Owners` as team 2 (another organization created\nbefore `acme`) and `mallory` a plain write collaborator with no custom team, the approval becomes official and the merge\nreturns `200`; with the approvals whitelist enabled and team 2 not listed, the flag stays false and the merge is refused.\n\nThe gain is one approval per pull request. By source, a further approval with a job token first clears `official` on\nall earlier reviews of user -2 (`models/issues/review.go:491`) and is itself stored as not official, and the lookup in\n`RemoveTeamReviewRequest` returns only the latest row (`:585-593`), so at most one `gitea-actions` review is official at\na time. Rules with `required_approvals` of 2 or more still need genuine reviewers for the rest. This was not part of the\nreproducer.\n\nThe flag is also reachable without any access to the organization: a user who opens a pull request from a fork against a\npublic repository of that organization can perform steps 2-4 (the poster may request and withdraw team reviews), and the\napproval becomes official. This was observed in a separate run; that user's own merge attempt is refused with\n`405 User not allowed to merge PR`, so it still takes somebody with merge rights to merge a pull request that now\ndisplays its approval requirement as met.\n\nNot exercised: private repositories. There the job token must come from a job that can read the target repository (a\nworkflow in that repository or one allowed by the owner's cross-repository Actions settings) instead of from an\nunrelated repository of the attacker.\n\n## Suggested fix\n\nThe attached patch removes the block from `RemoveTeamReviewRequest` (`models/issues/review.go:895-912`). It cannot find\nwhat its comment describes: team requests never change the `official` flag of a member's\nreview (`AddTeamReviewRequest` clears it only on rows with `reviewer_team_id = team`, `models/issues/review.go:855`), so\nthere is nothing to restore when the request is withdrawn. The rest of `RemoveTeamReviewRequest` (deleting the request\nrow, creating the comment) and the user-level counterpart `RemoveReviewRequest` are unchanged.\n\n```diff\n--- a/models/issues/review.go\n+++ b/models/issues/review.go\n@@ -892,25 +892,6 @@ func RemoveTeamReviewRequest(ctx context.Context, issue *Issue, reviewer *organi\n \t\t\treturn nil, err\n \t\t}\n \n-\t\tofficial, err := IsOfficialReviewerTeam(ctx, issue, reviewer)\n-\t\tif err != nil {\n-\t\t\treturn nil, fmt.Errorf(\"isOfficialReviewerTeam(): %w\", err)\n-\t\t}\n-\n-\t\tif official {\n-\t\t\t// recalculate which is the latest official review from that team\n-\t\t\treview, err := GetReviewByIssueIDAndUserID(ctx, issue.ID, -reviewer.ID)\n-\t\t\tif err != nil && !IsErrReviewNotExist(err) {\n-\t\t\t\treturn nil, err\n-\t\t\t}\n-\n-\t\t\tif review != nil {\n-\t\t\t\tif _, err := db.Exec(ctx, \"UPDATE `review` SET official=? WHERE id=?\", true, review.ID); err != nil {\n-\t\t\t\t\treturn nil, err\n-\t\t\t\t}\n-\t\t\t}\n-\t\t}\n-\n \t\tif doer == nil {\n \t\t\treturn nil, nil\n \t\t}\n```\n\nWith the attached patch applied to a clean checkout and the server rebuilt, the reproducer prints `OK`.\n\nThe patch also adds a regression test to `models/issues/review_test.go` (with the import `gitea.dev/models/organization`);\nit fails on the scanned commit at the last assertion and passes with the change. In the fixtures, team 2 is `org3/team1` and issue 12 is a\npull request of `org3/repo3`:\n\n```go\nfunc TestRemoveTeamReviewRequestDoesNotTouchSystemUserReview(t *testing.T) {\n\tassert.NoError(t, unittest.PrepareTestDatabase())\n\n\tissue := unittest.AssertExistsAndLoadBean(t, &issues_model.Issue{ID: 12})\n\tassert.NoError(t, issue.LoadRepo(t.Context()))\n\tteam := unittest.AssertExistsAndLoadBean(t, &organization.Team{ID: -user_model.ActionsUserID})\n\tdoer := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2})\n\tassert.NoError(t, db.Insert(t.Context(), &git_model.ProtectedBranch{RepoID: issue.RepoID, RuleName: \"master\", RequiredApprovals: 1}))\n\n\treview, err := issues_model.CreateReview(t.Context(), issues_model.CreateReviewOptions{\n\t\tType: issues_model.ReviewTypeApprove, Issue: issue, Reviewer: user_model.NewActionsUser(), Official: false,\n\t})\n\tassert.NoError(t, err)\n\n\t_, err = issues_model.AddTeamReviewRequest(t.Context(), issue, team, doer, false)\n\tassert.NoError(t, err)\n\t_, err = issues_model.RemoveTeamReviewRequest(t.Context(), issue, team, doer)\n\tassert.NoError(t, err)\n\n\treview = unittest.AssertExistsAndLoadBean(t, &issues_model.Review{ID: review.ID})\n\tassert.False(t, review.Official)\n}\n```\n\nThe patch does not repair rows that were already flipped: on an instance that was hit, reviews with `reviewer_id < 0`\nand `official = true` stay official, which may be worth a release note.\n\n## Suggested patch\n\n```diff\ndiff --git a/models/issues/review.go b/models/issues/review.go\nindex bb1541df2e..1c4f76385e 100644\n--- a/models/issues/review.go\n+++ b/models/issues/review.go\n@@ -892,25 +892,6 @@ func RemoveTeamReviewRequest(ctx context.Context, issue *Issue, reviewer *organi\n \t\t\treturn nil, err\n \t\t}\n \n-\t\tofficial, err := IsOfficialReviewerTeam(ctx, issue, reviewer)\n-\t\tif err != nil {\n-\t\t\treturn nil, fmt.Errorf(\"isOfficialReviewerTeam(): %w\", err)\n-\t\t}\n-\n-\t\tif official {\n-\t\t\t// recalculate which is the latest official review from that team\n-\t\t\treview, err := GetReviewByIssueIDAndUserID(ctx, issue.ID, -reviewer.ID)\n-\t\t\tif err != nil && !IsErrReviewNotExist(err) {\n-\t\t\t\treturn nil, err\n-\t\t\t}\n-\n-\t\t\tif review != nil {\n-\t\t\t\tif _, err := db.Exec(ctx, \"UPDATE `review` SET official=? WHERE id=?\", true, review.ID); err != nil {\n-\t\t\t\t\treturn nil, err\n-\t\t\t\t}\n-\t\t\t}\n-\t\t}\n-\n \t\tif doer == nil {\n \t\t\treturn nil, nil\n \t\t}\ndiff --git a/models/issues/review_test.go b/models/issues/review_test.go\nindex 0f074f7edb..598ddb3ebf 100644\n--- a/models/issues/review_test.go\n+++ b/models/issues/review_test.go\n@@ -9,6 +9,7 @@ import (\n \t\"gitea.dev/models/db\"\n \tgit_model \"gitea.dev/models/git\"\n \tissues_model \"gitea.dev/models/issues\"\n+\t\"gitea.dev/models/organization\"\n \trepo_model \"gitea.dev/models/repo\"\n \t\"gitea.dev/models/unittest\"\n \tuser_model \"gitea.dev/models/user\"\n@@ -440,3 +441,30 @@ func TestRecalculateReviewsOfficial(t *testing.T) {\n \treview = unittest.AssertExistsAndLoadBean(t, &issues_model.Review{ID: review.ID})\n \tassert.True(t, review.Official)\n }\n+\n+func TestRemoveTeamReviewRequestDoesNotTouchSystemUserReview(t *testing.T) {\n+\tassert.NoError(t, unittest.PrepareTestDatabase())\n+\n+\t// pull request of org3/repo3, team 2 (org3/team1) has write access and its negated id is the id of the Actions user\n+\tissue := unittest.AssertExistsAndLoadBean(t, &issues_model.Issue{ID: 12})\n+\tassert.NoError(t, issue.LoadRepo(t.Context()))\n+\tteam := unittest.AssertExistsAndLoadBean(t, &organization.Team{ID: -user_model.ActionsUserID})\n+\tdoer := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2})\n+\tassert.NoError(t, db.Insert(t.Context(), &git_model.ProtectedBranch{RepoID: issue.RepoID, RuleName: \"master\", RequiredApprovals: 1}))\n+\n+\treview, err := issues_model.CreateReview(t.Context(), issues_model.CreateReviewOptions{\n+\t\tType:     issues_model.ReviewTypeApprove,\n+\t\tIssue:    issue,\n+\t\tReviewer: user_model.NewActionsUser(),\n+\t\tOfficial: false,\n+\t})\n+\tassert.NoError(t, err)\n+\n+\t_, err = issues_model.AddTeamReviewRequest(t.Context(), issue, team, doer, false)\n+\tassert.NoError(t, err)\n+\t_, err = issues_model.RemoveTeamReviewRequest(t.Context(), issue, team, doer)\n+\tassert.NoError(t, err)\n+\n+\treview = unittest.AssertExistsAndLoadBean(t, &issues_model.Review{ID: review.ID})\n+\tassert.False(t, review.Official)\n+}\n\n```\n\n\n_Reported by the Anthropic OSS scanner, finding ANT-2026-MN8LDDEV (scan gitea-20261022-004), commit 31626de2a6cdd3e1fe93216e4ac80f511297f1e7._","summary":"Gitea's RemoveTeamReviewRequest looks up reviews under a negated team id, which matches the Actions system user (id -2), and marks that user's review as official. A user with write access can therefore get a job-token approval counted toward required approvals and merge their own pull request.","severity":"medium","cvss":null,"epss":null,"exploited":false,"exploited_at":null,"products":[{"name":"gitea.dev","fixed":["28.4.0"],"affected":">= 1.19, <= 28.3.0","ecosystem":"go"}],"ecosystems":["go"],"tags":["cwe-863","gitea","go","package","protected-branches","required-approvals","self-hosted"],"not_affected_if":["default-config","no-required-approvals","team-2-not-official-reviewer","version-28.4.0-or-later"],"how_to_check":"- Check the Gitea version with `gitea --version`; affected builds are `>= 1.19.0` up to `28.3.0`.\n- Find the team with id 2 in the instance (the second team ever created, usually the first after `Owners`) and check whether its organization has protected branches with required approvals.\n- Review whether any protected branch lists that team as an approvals whitelist member or grants it write access to code.","fix":"- Gitea `28.4.0` (per the product range; the advisory's patch removes the faulty block in `RemoveTeamReviewRequest`).","status":"open","published_at":"2026-11-15T21:03:13+00:00","first_seen_at":"2026-11-15T21:12:47+00:00","triaged_at":"2026-11-15T21:14:22+00:00","updated_at":"2026-11-15T21:14:22+00:00","category":"package","confidence":0.85,"triage":{"at":"2026-11-15T21:14:22Z","model":"claude-haiku-5-5","output":{"fix":"- Gitea `28.4.0` (per the product range; the advisory's patch removes the faulty block in `RemoveTeamReviewRequest`).","reach":"network","title":"Gitea: withdrawing a team review request lets one approval count as official","impact":"medium","summary":"Gitea's RemoveTeamReviewRequest looks up reviews under a negated team id, which matches the Actions system user (id -2), and marks that user's review as official. A user with write access can therefore get a job-token approval counted toward required approvals and merge their own pull request.","audience":"businesses","category":"package","nicknames":[],"who_cares":["gitea","self-hosted","go","protected-branches","required-approvals"],"confidence":0.85,"fix_status":"available","needs_auth":"yes","worst_case":"one job-token approval counts as official, letting a write user merge without review","analyst_note":"","how_to_check":"- Check the Gitea version with `gitea --version`; affected builds are `>= 1.19.0` up to `28.3.0`.\n- Find the team with id 2 in the instance (the second team ever created, usually the first after `Owners`) and check whether its organization has protected branches with required approvals.\n- Review whether any protected branch lists that team as an approvals whitelist member or grants it write access to code.","plain_action":"","product_name":"","needs_analyst":false,"not_affected_if":["default-config","no-required-approvals","team-2-not-official-reviewer","version-28.4.0-or-later"],"who_is_affected":"Only Gitea instances where a pull request on a protected branch with required approvals can be affected, and only in the organization that owns team id 2. The attacker needs write access to an organization repository, or can use a fork pull request against a public repository of that organization, and it still takes someone with merge rights to merge the fork pull request. Instances without required approvals, or whose team id 2 is not an official reviewer team, are not affected.","user_interaction":"no","product_ecosystem":"","needs_special_setup":"yes","severity_if_unknown":"unknown"},"cost_usd":0.001241,"input_tokens":8992,"output_tokens":684,"severity_before":"medium"},"analyst_status":null,"analyst_note":null,"search":"'-128365':13A,21A '-2':55B,254C,414C,584C '-2026':12A,20A '-54':581C '-863':24B '/api/v1/repos':447C '/issues/request_review':460C '/pulls':450C '/requested_reviewers':452C '2':5A,134C,159C,305C,376C,598C,675C '200':371C,680C '3':367C '31626de2a6cdd3e1fe93216e4ac80f511297f1e7':425C '4011821c946e':417C '405':351C,656C '49':580C '549c':18A '6hjp':17A '74jf':16A '848':554C '895':203C,490C '912':204C 'accept':369C 'access':68B,91C,174C,381C,434C,692C 'acm':696C 'acme/app':697C 'action':7A,51B,119C,140C,260C,334C,411C,590C,610C 'actionsuserid':253C,583C 'addteamreviewrequest':552C 'affect':148C 'approv':10A,33B,76B,80B,108C,114C,141C,181C,301C,323C,356C,443C,647C,661C 'approve/reject/request':605C 'around':201C 'arriv':415C 'attach':339C 'attack':184C,272C,428C 'author':634C,664C 'behind':258C,588C 'branch':30B,104C,172C,441C,703C 'bug':196C 'bypass':9A 'cannot':397C 'carri':560C 'check':623C 'code':176C 'commit':424C 'condit':622C 'configur':427C 'count':77B,165C,298C,310C 'ctx':223C,494C,512C,521C 'cve':11A,19A 'cwe':23B 'date':403C 'db.exec':520C 'default':343C,426C 'delet':446C 'detail':422C 'doer':587C 'enough':355C,660C 'entri':444C 'err':492C,510C,519C,530C 'ever':238C,535C 'everi':259C,589C 'exist':571C 'fals':294C 'find':234C 'first':418C 'flag':388C 'flip':386C 'fork':394C 'form':456C 'gain':318C 'get':71B 'getgrantedapprovalscount':309C 'getreviewbyissueidanduserid':222C,511C 'ghsa':15A 'ghsa-74jf-6hjp-549c':14A 'gitea':25B,37B,139C,333C,609C 'gitea-act':138C,332C,608C 'gitea.dev':22A 'go':26B,488C 'goe':315C 'harmless':408C 'host':36B 'human':111C 'id':4A,47B,54B,132C,158C,244C,247C,366C,375C,413C,486C,527C,539C,550C,565C,568C,597C,674C 'ident':257C,363C 'includ':266C 'index':451C 'instanc':154C,345C,643C 'isofficialreviewerteam':493C,626C 'issu':495C 'issue.id':224C,513C 'job':74B,120C,261C,264C,591C,651C 'job-token':73B 'latest':216C,473C,503C,604C 'limit':320C 'line':202C 'list':178C 'look':40B,213C,480C 'lookup':402C,600C 'main':702C 'mallori':683C 'mark':57B,618C 'match':49B 'member':191C,559C,562C,686C 'merg':82B,97C,314C,347C,398C,678C 'models/issues/review.go':200C,489C,553C 'models/user/user_system.go':579C 'need':187C 'negat':45B,242C,245C,566C 'nil':517C,531C 'normal':290C 'offici':63B,144C,168C,228C,293C,474C,491C,498C,504C,525C,620C 'one':145C,150C,267C,322C 'organ':94C,151C,384C,437C,695C 'otherwis':362C 'own':156C 'owner':448C,458C 'packag':27B 'path':682C 'per':324C 'point':445C 'post':284C,457C 'pr':116C,329C,395C 'protect':29B,105C,440C 'protected-branch':28B 'public':281C,699C 'pull':85B,100C,325C,613C,645C 'read':279C 'recalcul':499C 'refus':349C,358C,654C 'regist':273C 'regular':430C 'releas':419C 'removeteamreviewrequest':1A,39B,199C,468C 'repo':449C,459C 'repositori':95C,277C,282C,438C 'reproduc':340C 'request':86B,101C,123C,209C,306C,326C,465C,543C,614C,646C,665C 'requir':32B,79B,107C,300C,442C 'required-approv':31B 'restor':471C 'return':602C,679C 'review':42B,61B,112C,127C,169C,208C,217C,236C,246C,286C,288C,337C,464C,475C,485C,496C,505C,509C,516C,523C,533C,538C,548C,556C,567C,606C,669C 'review.id':529C 'reviewer.id':225C,514C 'row':232C,546C,637C 'run':341C,642C 'runner':270C 'scan':423C 'self':35B 'self-host':34B 'set':227C,524C,551C 'show':331C 'sqlite':344C 'still':357C 'store':239C,291C,536C 'system':52B,249C,576C 'team':3A,46B,130C,157C,164C,194C,207C,220C,243C,304C,364C,374C,463C,478C,508C,542C,549C,558C,595C,630C,672C,689C 'team.id':487C 'teamid':540C 'therefor':70B,601C 'though':251C,572C 'token':75B,121C,262C,265C,592C,652C 'toward':78B,299C 'treat':2A 'tri':469C 'true':229C,528C 'turn':136C 'updat':522C,617C,639C 'user':8A,53B,59B,65B,88C,250C,378C,412C,431C,577C 'v1.13.0':405C 'v1.19.0':421C 'valu':569C 'visibl':330C 'way':391C 'web':455C 'whatev':231C 'whitelist':182C 'whose':131C,439C 'withdraw':125C,360C,373C,667C 'withdrawn':211C,308C,467C 'without':109C 'write':67B,90C,173C,433C,691C","nicknames":[],"mitigations":[],"who_affected":"Only Gitea instances where a pull request on a protected branch with required approvals can be affected, and only in the organization that owns team id 2. The attacker needs write access to an organization repository, or can use a fork pull request against a public repository of that organization, and it still takes someone with merge rights to merge the fork pull request. Instances without required approvals, or whose team id 2 is not an official reviewer team, are not affected.","tier":"C","verified":{},"analyst_revisit_at":null,"fix_status":"available","audience":"businesses","plain_action":null,"pkeys":["giteadev"],"ptokens":["dev","gitea"],"labels":["cwe863","gitea","go","medium","package","protectedbranches","requiredapprovals","selfhosted"],"campaign_type":null,"search_a":"'-128365':13A,21A '-2026':12A,20A '2':5A '549c':18A '6hjp':17A '74jf':16A 'action':7A 'approv':10A 'bypass':9A 'cve':11A,19A 'ghsa':15A 'ghsa-74jf-6hjp-549c':14A 'gitea.dev':22A 'id':4A 'removeteamreviewrequest':1A 'team':3A 'treat':2A 'user':8A","search_b":"'-2':55B '-863':24B 'access':68B 'action':51B 'approv':33B,76B,80B 'branch':30B 'count':77B 'cwe':23B 'get':71B 'gitea':25B,37B 'go':26B 'host':36B 'id':47B,54B 'job':74B 'job-token':73B 'look':40B 'mark':57B 'match':49B 'merg':82B 'negat':45B 'offici':63B 'packag':27B 'protect':29B 'protected-branch':28B 'pull':85B 'removeteamreviewrequest':39B 'request':86B 'requir':32B,79B 'required-approv':31B 'review':42B,61B 'self':35B 'self-host':34B 'system':52B 'team':46B 'therefor':70B 'token':75B 'toward':78B 'user':53B,59B,65B 'write':67B","search_c":"'-2':254C,414C,584C '-54':581C '/api/v1/repos':447C '/issues/request_review':460C '/pulls':450C '/requested_reviewers':452C '2':134C,159C,305C,376C,598C,675C '200':371C,680C '3':367C '31626de2a6cdd3e1fe93216e4ac80f511297f1e7':425C '4011821c946e':417C '405':351C,656C '49':580C '848':554C '895':203C,490C '912':204C 'accept':369C 'access':91C,174C,381C,434C,692C 'acm':696C 'acme/app':697C 'action':119C,140C,260C,334C,411C,590C,610C 'actionsuserid':253C,583C 'addteamreviewrequest':552C 'affect':148C 'approv':108C,114C,141C,181C,301C,323C,356C,443C,647C,661C 'approve/reject/request':605C 'around':201C 'arriv':415C 'attach':339C 'attack':184C,272C,428C 'author':634C,664C 'behind':258C,588C 'branch':104C,172C,441C,703C 'bug':196C 'cannot':397C 'carri':560C 'check':623C 'code':176C 'commit':424C 'condit':622C 'configur':427C 'count':165C,298C,310C 'ctx':223C,494C,512C,521C 'date':403C 'db.exec':520C 'default':343C,426C 'delet':446C 'detail':422C 'doer':587C 'enough':355C,660C 'entri':444C 'err':492C,510C,519C,530C 'ever':238C,535C 'everi':259C,589C 'exist':571C 'fals':294C 'find':234C 'first':418C 'flag':388C 'flip':386C 'fork':394C 'form':456C 'gain':318C 'getgrantedapprovalscount':309C 'getreviewbyissueidanduserid':222C,511C 'gitea':139C,333C,609C 'gitea-act':138C,332C,608C 'go':488C 'goe':315C 'harmless':408C 'human':111C 'id':132C,158C,244C,247C,366C,375C,413C,486C,527C,539C,550C,565C,568C,597C,674C 'ident':257C,363C 'includ':266C 'index':451C 'instanc':154C,345C,643C 'isofficialreviewerteam':493C,626C 'issu':495C 'issue.id':224C,513C 'job':120C,261C,264C,591C,651C 'latest':216C,473C,503C,604C 'limit':320C 'line':202C 'list':178C 'look':213C,480C 'lookup':402C,600C 'main':702C 'mallori':683C 'mark':618C 'member':191C,559C,562C,686C 'merg':97C,314C,347C,398C,678C 'models/issues/review.go':200C,489C,553C 'models/user/user_system.go':579C 'need':187C 'negat':242C,245C,566C 'nil':517C,531C 'normal':290C 'offici':144C,168C,228C,293C,474C,491C,498C,504C,525C,620C 'one':145C,150C,267C,322C 'organ':94C,151C,384C,437C,695C 'otherwis':362C 'own':156C 'owner':448C,458C 'path':682C 'per':324C 'point':445C 'post':284C,457C 'pr':116C,329C,395C 'protect':105C,440C 'public':281C,699C 'pull':100C,325C,613C,645C 'read':279C 'recalcul':499C 'refus':349C,358C,654C 'regist':273C 'regular':430C 'releas':419C 'removeteamreviewrequest':199C,468C 'repo':449C,459C 'repositori':95C,277C,282C,438C 'reproduc':340C 'request':101C,123C,209C,306C,326C,465C,543C,614C,646C,665C 'requir':107C,300C,442C 'restor':471C 'return':602C,679C 'review':112C,127C,169C,208C,217C,236C,246C,286C,288C,337C,464C,475C,485C,496C,505C,509C,516C,523C,533C,538C,548C,556C,567C,606C,669C 'review.id':529C 'reviewer.id':225C,514C 'row':232C,546C,637C 'run':341C,642C 'runner':270C 'scan':423C 'set':227C,524C,551C 'show':331C 'sqlite':344C 'still':357C 'store':239C,291C,536C 'system':249C,576C 'team':130C,157C,164C,194C,207C,220C,243C,304C,364C,374C,463C,478C,508C,542C,549C,558C,595C,630C,672C,689C 'team.id':487C 'teamid':540C 'therefor':601C 'though':251C,572C 'token':121C,262C,265C,592C,652C 'toward':299C 'tri':469C 'true':229C,528C 'turn':136C 'updat':522C,617C,639C 'user':88C,250C,378C,412C,431C,577C 'v1.13.0':405C 'v1.19.0':421C 'valu':569C 'visibl':330C 'way':391C 'web':455C 'whatev':231C 'whitelist':182C 'whose':131C,439C 'withdraw':125C,360C,373C,667C 'withdrawn':211C,308C,467C 'without':109C 'write':90C,173C,433C,691C","cause_entry":null,"cause_path":null,"disclosures_checked_at":null,"first_public_at":"2026-11-15T21:03:13+00:00","kev":null,"cvss_vector":null,"cvss_by":null,"poc_count":0,"sources":[{"source":"ghsa-repo","external_id":"GHSA-74jf-6hjp-549c","url":"https://github.com/go-gitea/gitea/security/advisories/GHSA-74jf-6hjp-549c","severity":"medium","published_at":"2026-11-15T21:03:13+00:00","modified_at":"2026-11-15T21:03:13+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-128365","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-128365","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:23+00:00","note":null}],"documents":[{"id":165568,"url":"https://github.com/go-gitea/gitea/security/advisories/GHSA-74jf-6hjp-549c","title":"Maintainer's advisory: github.com","kind":"vendor","source":"ghsa-repo","publisher":"vendor","text":null,"published_at":"2026-11-15T21:03:13+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"}