CVE-2026-24451: Gitea: Fork Synchronization Continues After Parent Repository Changes from Public to Private
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.
Published Jul 21, 2026
Affected packages
code.gitea.io/gitea
- Ecosystem
- Go
- Affected
- < 1.26.3
- Fixed in
- 1.26.3
- Check
go list -m code.gitea.io/gitea
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
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:
- A repository is public.
- Another user creates a fork.
- The fork owner uses
merge-upstreamto 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
- User
alicecreates a public repositoryalice/P. - User
bobforks the repository, creatingbob/P. alicechangesalice/Pfrom public to private.- Verify that
bobcan no longer directly access the parent repository:
GET /api/v1/repos/alice/PResponse:
404 Not FoundGET /api/v1/repos/alice/P/contents/README.mdResponse:
404 Not Found- While the repository is private,
alicecommits a new file:
secret.txt- Verify that
bobcannot directly access the new file from the parent repository:
GET /api/v1/repos/alice/P/contents/secret.txtResponse:
404 Not Foundbobsynchronizes the fork:
POST /api/v1/repos/bob/P/merge-upstreamResponse:
200 OK- The newly added file is now available through the fork repository:
GET /api/v1/repos/bob/P/contents/secret.txtResponse:
200 OKThe 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:
GET /api/v1/repos/bob/P/git/commits/<private-period-commit-sha>Response:
404 Not FoundThis 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.
Credited to ybsun0215.
References
- https://github.com/go-gitea/gitea/security/advisories/GHSA-wrf9-r3h7-7x5v
- https://nvd.nist.gov/vuln/detail/CVE-2026-24451
- https://github.com/go-gitea/gitea/pull/38151
- https://blog.gitea.com/release-of-1.26.3-and-1.26.4
- https://github.com/go-gitea/gitea/releases/tag/v1.26.3
- https://github.com/advisories/GHSA-wrf9-r3h7-7x5v
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More Go vulnerabilities
All Go entriesCVE-2026-20779
Gitea: TOTP TOCTOU race on web 2FA paths + missing replay check on Basic-Auth `X-Gitea-OTP` surface
high7.1Jul 21, 2026CVE-2026-20896
Gitea Docker image: `REVERSE_PROXY_TRUSTED_PROXIES = *` default lets any source IP impersonate any user via `X-WEBAUTH-USER`
critical9.8Jul 21, 2026CVE-2026-22874
Gitea: Incomplete SSRF Protection in Webhook and Migration Allow-list Default Filter
critical9.6Jul 21, 2026CVE-2026-23603
Gitea: Blind SSRF in OAuth2 avatar synchronization via unvalidated OIDC picture claim
low3.1Jul 21, 2026CVE-2026-25038
Gitea: Unauthorized Access to Labels of Private Organizations
high7.5Jul 21, 2026CVE-2026-27761
Gitea: API access token scope enforcement bypass on repository RSS/Atom feed endpoints leaks private repository commit data
medium4.3Jul 21, 2026
