CVE-2026-24451: Gitea Fork Synchronization Continues After Parent Vulnerability

HIGH
Advisory Identifier: GHSA-wrf9-r3h7-7x5v
CVSS 7.5
CWE-284 CWE-200
Published
Advisory Summary

CVE-2026-24451 is a HIGH (CVSS 7.5) fork synchronization continues after parent vulnerability (CWE-284: Improper Access Control) affecting Gitea libraries in the Go ecosystem. The issue involves fork synchronization continues after parent repository changes from public to private. Remediation is available by upgrading affected packages to version 1.26.3.

CVE-2026-24451 at a Glance

CVE Identifier CVE-2026-24451
GHSA Identifier GHSA-wrf9-r3h7-7x5v
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-284: Improper Access Control
Affected Product Gitea
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2026-24451

To remediate this vulnerability, upgrade all affected Gitea dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

code.gitea.io/gitea fixed: 1.26.3
Upgrade code.gitea.io/gitea to 1.26.3
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for code.gitea.io/gitea

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-24451, inspect your project dependencies for Gitea:

inspect dependencies for code.gitea.io/gitea

Analyze the terminal output to locate any version of Gitea in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.26.3), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-284: Improper Access Control, where the product does not restrict or incorrectly restricts access to a resource from an unauthorized actor. In Gitea, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary The `POST /api/v1/repos/{owner}/{repo}/merge-upstream` endpoint continues to synchronize commits from a parent repository after the parent repository has been changed from public to private. A fork created while the parent repository was public can still receive commits made after the parent repository becomes private. As a result, content added during the private period becomes available through the fork repository after synchronization. ### Details Gitea provides the `merge-upstream` API to synchronize a fork with its parent repository. A typical workflow is: 1. A repository is public. 2. Another user creates a fork. 3. The fork owner uses `merge-upstream` to receive updates from the parent repository. However, if the parent repository is later changed from public to private, the synchronization endpoint continues to import new commits from the parent repository into the fork. In testing on Gitea 1.26.2, a fork owner who can no longer directly access the parent repository is still able to synchronize newly created commits from the parent repository into the fork by calling `merge-upstream`. As a result, commits created after the visibility change can be propagated into the fork through the normal fork synchronization workflow. ### PoC #### Proof-of-Concept Code https://anonymous.4open.science/r/Gitea_PoC-EC93/4_poc_merge_upstream #### PoC Details 1. User `alice` creates a public repository `alice/P`. 2. User `bob` forks the repository, creating `bob/P`. 3. `alice` changes `alice/P` from public to private. 4. Verify that `bob` can no longer directly access the parent repository: ```http GET /api/v1/repos/alice/P ``` Response: ```http 404 Not Found ``` ```http GET /api/v1/repos/alice/P/contents/README.md ``` Response: ```http 404 Not Found ``` 5. While the repository is private, `alice` commits a new file: ```text secret.txt ``` 6. Verify that `bob` cannot directly access the new file from the parent repository: ```http GET /api/v1/repos/alice/P/contents/secret.txt ``` Response: ```http 404 Not Found ``` 7. `bob` synchronizes the fork: ```http POST /api/v1/repos/bob/P/merge-upstream ``` Response: ```http 200 OK ``` 8. The newly added file is now available through the fork repository: ```http GET /api/v1/repos/bob/P/contents/secret.txt ``` Response: ```http 200 OK ``` The attached PoC reproduces the behavior end-to-end. As a control test, attempting to access the private-period commit directly through the fork's Git API before synchronization fails: ```http GET /api/v1/repos/bob/P/git/commits/<private-period-commit-sha> ``` Response: ```http 404 Not Found ``` This indicates that the commit becomes available in the fork only after the `merge-upstream` operation synchronizes it from the parent repository. ### Impact A fork created while a repository is public can continue receiving updates from the parent repository after the parent repository is changed to private. Consequently, content committed after the visibility change may become available through fork synchronization even when the fork owner can no longer directly access the parent repository. The impact is limited to content that is synchronized from the parent repository into the affected fork. The issue does not allow modification of the parent repository or access to repositories that were never forked.

CVE-2026-24451 Affected Gitea Versions

1 component(s)
Fixed Versions:
1.26.3
Product / Package Ecosystem Affected Versions Fixed Version
code.gitea.io/gitea
Go
< 1.26.3
1.26.3

References

Frequently Asked Questions

What is CVE-2026-24451?
CVE-2026-24451 is a security vulnerability in Gitea involving Fork Synchronization Continues After Parent Repository Changes from Public to Private under CWE-284: Improper Access Control.
Which Gitea versions are affected?
Affected versions include releases prior to 1.26.3 across affected packages: code.gitea.io/gitea.
What version fixes CVE-2026-24451?
Upgrading to 1.26.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is code.gitea.io/gitea affected?
Yes, code.gitea.io/gitea is affected in releases prior to 1.26.3. Upgrade your dependency to 1.26.3 or later.
What is the CVSS score of CVE-2026-24451?
CVE-2026-24451 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2026-24451?
CVE-2026-24451 is classified under CWE-284: Improper Access Control (The product does not restrict or incorrectly restricts access to a resource from an unauthorized actor.).
How can I check Go dependencies for CVE-2026-24451?
Run the dependency tree command: 'inspect dependencies for code.gitea.io/gitea'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-wrf9-r3h7-7x5v",
  "modified" : "2026-07-21T21:42:28Z",
  "published" : "2026-07-21T21:42:28Z",
  "aliases" : [ "CVE-2026-24451" ],
  "summary" : "Gitea: Fork Synchronization Continues After Parent Repository Changes from Public to Private",
  "details" : "### Summary\n\nThe `POST /api/v1/repos/{owner}/{repo}/merge-upstream` endpoint continues to synchronize commits from a parent repository after the parent repository has been changed from public to private.\n\nA fork created while the parent repository was public can still receive commits made after the parent repository becomes private. As a result, content added during the private period becomes available through the fork repository after synchronization.\n\n### Details\n\nGitea provides the `merge-upstream` API to synchronize a fork with its parent repository.\n\nA typical workflow is:\n\n1. A repository is public.\n2. Another user creates a fork.\n3. The fork owner uses `merge-upstream` to receive updates from the parent repository.\n\nHowever, if the parent repository is later changed from public to private, the synchronization endpoint continues to import new commits from the parent repository into the fork.\n\nIn testing on Gitea 1.26.2, a fork owner who can no longer directly access the parent repository is still able to synchronize newly created commits from the parent repository into the fork by calling `merge-upstream`.\n\nAs a result, commits created after the visibility change can be propagated into the fork through the normal fork synchronization workflow.\n\n### PoC\n\n#### Proof-of-Concept Code\n\nhttps://anonymous.4open.science/r/Gitea_PoC-EC93/4_poc_merge_upstream\n\n#### PoC Details\n\n1. User `alice` creates a public repository `alice/P`.\n2. User `bob` forks the repository, creating `bob/P`.\n3. `alice` changes `alice/P` from public to private.\n4. Verify that `bob` can no longer directly access the parent repository:\n\n```http\nGET /api/v1/repos/alice/P\n```\n\nResponse:\n\n```http\n404 Not Found\n```\n\n```http\nGET /api/v1/repos/alice/P/contents/README.md\n```\n\nResponse:\n\n```http\n404 Not Found\n```\n\n5. While the repository is private, `alice` commits a new file:\n\n```text\nsecret.txt\n```\n\n6. Verify that `bob` cannot directly access the new file from the parent repository:\n\n```http\nGET /api/v1/repos/alice/P/contents/secret.txt\n```\n\nResponse:\n\n```http\n404 Not Found\n```\n\n7. `bob` synchronizes the fork:\n\n```http\nPOST /api/v1/repos/bob/P/merge-upstream\n```\n\nResponse:\n\n```http\n200 OK\n```\n\n8. The newly added file is now available through the fork repository:\n\n```http\nGET /api/v1/repos/bob/P/contents/secret.txt\n```\n\nResponse:\n\n```http\n200 OK\n```\n\nThe attached PoC reproduces the behavior end-to-end.\n\nAs a control test, attempting to access the private-period commit directly through the fork's Git API before synchronization fails:\n\n```http\nGET /api/v1/repos/bob/P/git/commits/<private-period-commit-sha>\n```\n\nResponse:\n\n```http\n404 Not Found\n```\n\nThis indicates that the commit becomes available in the fork only after the `merge-upstream` operation synchronizes it from the parent repository.\n\n### Impact\n\nA fork created while a repository is public can continue receiving updates from the parent repository after the parent repository is changed to private.\n\nConsequently, content committed after the visibility change may become available through fork synchronization even when the fork owner can no longer directly access the parent repository.\n\nThe impact is limited to content that is synchronized from the parent repository into the affected fork. The issue does not allow modification of the parent repository or access to repositories that were never forked.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "code.gitea.io/gitea"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.26.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/go-gitea/gitea/security/advisories/GHSA-wrf9-r3h7-7x5v"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-24451"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/go-gitea/gitea/pull/38151"
  }, {
    "type" : "WEB",
    "url" : "https://blog.gitea.com/release-of-1.26.3-and-1.26.4"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/go-gitea/gitea"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/go-gitea/gitea/releases/tag/v1.26.3"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-200", "CWE-284" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-07-21T21:42:28Z",
    "nvd_published_at" : "2026-07-03T21:16:57Z"
  }
}