/

CVE-2026-24451

Severity:

HIGH RISK

(7.5)

Authorization Bypass (CWE-284) in Gitea Fork Sync

CVE-2026-24451

Deferred

Vulnerability type

Category:

Authorization Bypass

CWE:

CWE-200, CWE-284

Impact:

Unauthorized Data Exposure

Severity:

HIGH RISK

(7.5)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Gitea 1.26.2 contains an authorization flaw that allows forked repositories to keep synchronizing after the parent repository is switched from public to private.

Under these conditions, a fork owner may continue receiving updates they are no longer authorized to access, resulting in unintended source code exposure.

Affected context

This vulnerability occurs in Gitea instances where repository forking is enabled and repositories can be transitioned from public to private visibility.

When a public repository is forked and later made private, the fork's synchronization logic may continue to pull changes from the parent.

The issue is most relevant in multi-user deployments that rely on repository privacy settings to enforce access control over source code.

Exploit preconditions

  • Attack surface: Gitea repository management and fork synchronization functionality
  • Required access: Ability to create or control a fork of a repository that later becomes private
  • Trigger point: Parent repository visibility change from public to private after the fork is created
  • Why exploitation is possible: Authorization checks for synchronization do not consistently re-evaluate the parent's updated privacy and access control state, allowing continued data flow to the fork.

Why this happens

The underlying issue is an authorization logic gap where access control is treated as a one-time check at fork creation rather than an ongoing constraint on synchronization.

Visibility and permission changes on the parent repository are not fully propagated or enforced against existing forks, which maps to CWE-284: Improper Access Control and CWE-200: Exposure of Sensitive Information to an Unauthorized Actor.

Abstractly, the insecure pattern is failing to re-check authorization on secondary operations (like sync or replication) when the security state of a primary object changes.

Potential impact

  • Fork owners may continue to receive private commits and branches they should no longer see
  • Sensitive source code, configuration files, or internal documentation could be exposed
  • Leakage of proprietary algorithms or business logic to unauthorized users
  • Increased risk of further compromise if exposed code contains other exploitable vulnerabilities

General mitigation guidance

Mitigation generally focuses on tightening permission enforcement around derived artifacts such as forks when the parent repository's access level changes.

Useful patterns include:

  • Enforcing real-time permission checks for sync, pull, and replication operations based on current repository visibility and membership
  • Propagating privacy state changes to forks, including revoking automatic synchronization when a parent becomes private
  • Designing fork and mirror features so that they default to the most restrictive behavior when access control is ambiguous
  • Applying least-privilege principles to repository relationships, ensuring that forks do not retain broader access than their owners currently possess
  • Periodically validating relationships between parent and fork repositories to detect inconsistent access patterns

How teams detect issues like this

Detection can be approached by:

  • Reviewing access control logic for repository operations to ensure authorization is checked on every sync or replication event
  • Using static analysis or custom rules to flag code paths where fork synchronization is performed without re-evaluating current permissions
  • Auditing logs to identify synchronization activity from forks after a parent repository's visibility changes to private
  • Establishing policy-based tests in CI/CD that simulate privacy state changes and assert that derived repositories no longer receive updates

Sources

SourceLink
blog.gitea.comblog.gitea.com/release-of-1.26.3-and-1.26.4/
github.comgithub.com/go-gitea/gitea/pull/38151
github.comgithub.com/go-gitea/gitea/releases/tag/v1.26.3
github.comgithub.com/go-gitea/gitea/security/advisories/GHSA-wrf9-r3h7-7x5v

Frequently asked

questions

Exploitability is limited to users who control forks of repositories that later become private, but in collaborative or hosted environments this can affect many projects and users.

An attacker typically needs standard user access sufficient to fork a public repository and maintain control of that fork; no elevated privileges are required beyond that.

The safest approach is to ensure that every synchronization or replication operation performs a fresh authorization check based on the parent repository's current visibility and the fork owner's permissions, disabling or revoking sync when access is no longer valid.

Preventive strategies include designing access control as a continuous constraint, propagating state changes across all dependent objects (forks, mirrors, clones), performing regular security-focused code reviews of permission checks, and implementing automated tests that cover transitions between public and private states.

Find out what's already
exploitable in your codebase.