Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🐹 Go
Not in CISA KEV

GHSA-rjvx-x5h2-6px5

Fix: go-gitea/gitea#36950

GHSA-rjvx-x5h2-6px5 is a security vulnerability in code.gitea.io/gitea. O3 Security confirms whether GHSA-rjvx-x5h2-6px5 is actually reachable in your code before you act, and blocks exploitation at runtime until you patch.

Gitea: API Fork Endpoint Authorization Bypass Allows Organization Members to Bypass Repository Creation Restrictions

Also known asGO-2026-6074
Published
Jul 21, 2026
Updated
Jul 27, 2026
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Jul 27, 2026 · OSV.dev, FIRST.org (EPSS)

Real-World Exposure

1 pkg affected
🐹code.gitea.io/gitea

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.

Description

Summary

The API endpoint used to fork repositories into organizations performs a weaker authorization check than the corresponding web UI and other repository creation endpoints.

When 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()).

As 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.

Details

Affected endpoint:

POST /api/v1/repos/{owner}/{repo}/forks

In routers/api/v1/repo/fork.go, the endpoint performs the following authorization check:

if !ctx.Doer.IsAdmin {
    isMember, err := org.IsOrgMember(ctx, ctx.Doer.ID)
    if !isMember {
        ctx.APIError(http.StatusForbidden, ...)
        return
    }
}

The equivalent web UI implementation uses the stronger permission check:

isAllowedToFork, err := organization.OrgFromUser(ctxUser).
    CanCreateOrgRepo(ctx, ctx.Doer.ID)

The same CanCreateOrgRepo() authorization check is also used by:

  • CreateOrgRepo API endpoint
  • GenerateRepository API endpoint

The fork endpoint appears to be the only repository creation path that relies solely on organization membership.

Proof of Concept

Tested on Gitea 1.23.7.

  1. Create an organization.
  2. Create a team with can_create_org_repo=false.
  3. Add a test user to that team.
  4. Verify that normal repository creation is denied:
POST /api/v1/orgs/target-org/repos

Result:

403 Forbidden
  1. Fork a repository into the organization:
POST /api/v1/repos/admin/public-repo/forks
Content-Type: application/json

{
  "organization": "target-org"
}

Result:

202 Accepted

The repository is successfully created despite repository creation permissions being disabled.

Impact

Users who are organization members but are intentionally prevented from creating repositories can bypass that restriction through the API.

This allows unauthorized repository creation inside the organization and may expose additional attack surface depending on the organization's Actions, runner, and workflow configuration.

The vulnerability represents an authorization bypass because API behavior is less restrictive than both the web UI and other repository creation endpoints.

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
🐹Gocode.gitea.io/giteaall versions1.26.0

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for code.gitea.io/gitea. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.

  2. Fix

    Update code.gitea.io/gitea to 1.26.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-rjvx-x5h2-6px5 is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 pinpoints whether GHSA-rjvx-x5h2-6px5 is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.

Tailored to GHSA-rjvx-x5h2-6px5. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Frequently Asked Questions

### Summary The API endpoint used to fork repositories into organizations performs a weaker authorization check than the corresponding web UI and other repository creation endpoints. When 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()`). As a result, organization members belonging to teams with `can_create_org_repo=false` can still create repositories inside the organization by usi
O3 Security · Impact-Aware SCA

Is GHSA-rjvx-x5h2-6px5 in your dependencies?

O3 detects GHSA-rjvx-x5h2-6px5 across Go dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.

GHSA-rjvx-x5h2-6px5: gitea | O3 Security