{"answers":{"affected":"3 open source packages ship an affected version, including code.gitea.io/gitea.","exploited":"There is no known exploitation of GHSA-rjvx-x5h2-6px5 in the wild and no public exploit code.","fix":"Upgrade code.gitea.io/gitea to 1.26.0 or later.","what":"GHSA-rjvx-x5h2-6px5 is a missing authorization vulnerability in code.gitea.io/gitea, published on 21 Jul 2026. Any signed-in user can exploit it over the network, with no action from the victim."},"fix_prompt":"Check this codebase for GHSA-rjvx-x5h2-6px5 and fix it if it is affected.\n\nWhat it is: GHSA-rjvx-x5h2-6px5 is a missing authorization vulnerability in code.gitea.io/gitea, published on 21 Jul 2026. Any signed-in user can exploit it over the network, with no action from the victim.\nExploitation: There is no known exploitation of GHSA-rjvx-x5h2-6px5 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- code.gitea.io/gitea (Go): affected all versions; fixed in 1.26.0\n- code.gitea.io/gitea (Go): affected all versions; fixed in 1.26.0\n- code.gitea.io/gitea (Go): affected all versions; fixed in 1.26.0\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/GHSA-rjvx-x5h2-6px5/ (Markdown: https://insights.sbomify.com/GHSA-rjvx-x5h2-6px5/index.md)","id":"GHSA-rjvx-x5h2-6px5","markdown":"https://insights.sbomify.com/GHSA-rjvx-x5h2-6px5/index.md","name":"GHSA-rjvx-x5h2-6px5","record":{"aliases":["GO-2026-6074"],"analysis":{"component_type":"web_application","fix_type":"patch","impacts":["privilege_escalation","data_modify"],"network_reachable":"yes","non_default_config":false,"product_category":"Gitea Git hosting","requires_auth":"low_privilege","summary":"Organization members with restricted permissions can bypass repository creation limits by using the API fork endpoint instead of the web UI.","user_interaction":"not_required","vuln_class":"missing_authorization"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"### Summary\n\nThe API endpoint used to fork repositories into organizations performs a weaker authorization check than the corresponding web UI and other repository creation endpoints.\n\nWhen a repository is forked into an organization through the API, the endpoint only verifies that the user is an organization member (`IsOrgMember()`), but does not verify whether the user is allowed to create repositories in that organization (`CanCreateOrgRepo()`).\n\nAs a result, organization members belonging to teams with `can_create_org_repo=false` can still create repositories inside the organization by using the fork API.\n\n### Details\n\nAffected endpoint:\n\n```\nPOST /api/v1/repos/{owner}/{repo}/forks\n```\n\nIn `routers/api/v1/repo/fork.go`, the endpoint performs the following authorization check:\n\n```go\nif !ctx.Doer.IsAdmin {\n    isMember, err := org.IsOrgMember(ctx, ctx.Doer.ID)\n    if !isMember {\n        ctx.APIError(http.StatusForbidden, ...)\n        return\n    }\n}\n```\n\nThe equivalent web UI implementation uses the stronger permission check:\n\n```go\nisAllowedToFork, err := organization.OrgFromUser(ctxUser).\n    CanCreateOrgRepo(ctx, ctx.Doer.ID)\n```\n\nThe same `CanCreateOrgRepo()` authorization check is also used by:\n\n* CreateOrgRepo API endpoint\n* GenerateRepository API endpoint\n\nThe fork endpoint appears to be the only repository creation path that relies solely on organization membership.\n\n### Proof of Concept\n\nTested on Gitea 1.23.7.\n\n1. Create an organization.\n2. Create a team with `can_create_org_repo=false`.\n3. Add a test user to that team.\n4. Verify that normal repository creation is denied:\n\n```http\nPOST /api/v1/orgs/target-org/repos\n```\n\nResult:\n\n```http\n403 Forbidden\n```\n\n5. Fork a repository into the organization:\n\n```http\nPOST /api/v1/repos/admin/public-repo/forks\nContent-Type: application/json\n\n{\n  \"organization\": \"target-org\"\n}\n```\n\nResult:\n\n```http\n202 Accepted\n```\n\nThe repository is successfully created despite repository creation permissions being disabled.\n\n### Impact\n\nUsers who are organization members but are intentionally prevented from creating repositories can bypass that restriction through the API.\n\nThis allows unauthorized repository creation inside the organization and may expose additional attack surface depending on the organization's Actions, runner, and workflow configuration.\n\nThe vulnerability represents an authorization bypass because API behavior is less restrictive than both the web UI and other repository creation endpoints.","ecosystems":["Go"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"Gitea: API Fork Endpoint Authorization Bypass Allows Organization Members to Bypass Repository Creation Restrictions","id":"GHSA-rjvx-x5h2-6px5","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"Go","product":null,"products":[],"type":"missing_authorization","year":"2026"},"n_packages":3,"n_references":null,"packages":[{"ecosystem":"Go","fixed":["1.26.0"],"introduced":["0"],"last_affected":[],"package":"code.gitea.io/gitea","purl":null,"source":"GHSA-rjvx-x5h2-6px5"},{"ecosystem":"Go","fixed":["1.26.0"],"introduced":["0"],"last_affected":[],"package":"code.gitea.io/gitea","purl":"pkg:golang/code.gitea.io/gitea","source":"GHSA-rjvx-x5h2-6px5"},{"ecosystem":"Go","fixed":["1.26.0"],"introduced":["0"],"last_affected":[],"package":"code.gitea.io/gitea","purl":"pkg:golang/code.gitea.io/gitea","source":"GO-2026-6074"}],"products":null,"published":"2026-07-21","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"Go Vulnerability Database","prefix":"GO"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"Organization members with restricted permissions can bypass repository creation limits by using the API fork endpoint instead of the web UI.","url":"https://insights.sbomify.com/GHSA-rjvx-x5h2-6px5/"}