Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-97208 Overview
CVE-2026-97208 is an authorization flaw in Gitea's push mirror API endpoint. The endpoint POST /api/v1/repos/{owner}/{repo}/push_mirrors verified only whether the mirroring feature was enabled. It failed to honor the [mirror] DISABLE_NEW_PUSH configuration that the web interface enforces. A repository administrator could therefore create new push mirrors even when the site administrator had explicitly disabled them. A push mirror forwards all repository refs to a remote endpoint chosen by the caller, either on every commit or on a schedule. The flaw is tracked under CWE-863: Incorrect Authorization.
Critical Impact
Repository administrators can bypass a site-wide policy and exfiltrate repository content to attacker-controlled remotes through the API, defeating a configuration intended to block that behavior.
Affected Products
- Gitea self-hosted Git service
- Gitea instances with [mirror] ENABLED = true and [mirror] DISABLE_NEW_PUSH = true
- Gitea releases prior to v28.1.0
Discovery Timeline
- 2026-10-06 - CVE-2026-97208 published to NVD
- 2026-10-07 - Last updated in NVD database
Technical Details for CVE-2026-97208
Vulnerability Analysis
Gitea exposes push mirrors as a repository feature that forwards refs to an arbitrary remote URL. Site administrators can disable creation of new push mirrors through the [mirror] DISABLE_NEW_PUSH setting in app.ini. The web user interface honors this setting and blocks new mirror creation. The REST API path at POST /api/v1/repos/{owner}/{repo}/push_mirrors applied a different authorization check. It validated only that mirroring itself was enabled, which left DISABLE_NEW_PUSH unenforced on the API surface. A user with repository administrator rights could therefore send a direct API request and register a new push mirror pointing to any remote.
Root Cause
The root cause is inconsistent policy enforcement across control planes, classified as CWE-863: Incorrect Authorization. The authorization logic in the API handler diverged from the UI handler. The UI handler consulted both ENABLED and DISABLE_NEW_PUSH, while the API handler consulted only ENABLED. Fixes landed in Gitea Pull Request #39501 and Gitea Pull Request #39507.
Attack Vector
An authenticated repository administrator sends a crafted HTTP POST to the push mirror API with a remote URL under their control. Gitea accepts the request and begins mirroring repository refs to that remote on commit or on the configured interval. The attack requires administrator privileges on the target repository but does not require site administrator rights. The result is a persistent data egress channel from the Gitea instance to an external destination. See the GitHub Security Advisory GHSA-8hhh-mqpg-jpxc for the advisory record.
Detect Identity Attacks the Moment Authentication Fails
Singularity™ Identity surfaces credential misuse, lateral movement, and privilege escalation in real time, so you can contain the breach before it spreads.
Stop Identity AttacksDetection Methods for CVE-2026-97208
Indicators of Compromise
- Unexpected entries in the push_mirror database table referencing external remote URLs
- Outbound Git traffic (HTTPS or SSH) from the Gitea host to domains not previously used for mirroring
- Audit log entries showing API calls to POST /api/v1/repos/{owner}/{repo}/push_mirrors on instances where DISABLE_NEW_PUSH is set
- New mirror configurations created outside of normal change windows or by non-standard API tokens
Detection Strategies
- Query the Gitea database for push mirror records and compare remote URLs against an allowlist of sanctioned destinations
- Parse Gitea access logs for POST requests to the push_mirrors API endpoint and alert when DISABLE_NEW_PUSH is enabled in app.ini
- Correlate repository administrator API tokens with mirror creation events to identify unauthorized use
Monitoring Recommendations
- Forward Gitea application and reverse proxy logs to a centralized logging platform for retention and search
- Alert on new outbound Git protocol connections from the Gitea server to previously unseen hosts
- Monitor repository configuration changes and generate tickets for review when new mirrors appear
How to Mitigate CVE-2026-97208
Immediate Actions Required
- Upgrade Gitea to v28.1.0 or later
- Audit the push_mirror table and remove any mirrors created to unapproved remotes
- Rotate API tokens held by repository administrators if unauthorized mirror creation is suspected
- Review app.ini to confirm [mirror] DISABLE_NEW_PUSH reflects current policy after the upgrade
Patch Information
The fix is included in Gitea v28.1.0. Details are described in the Gitea Blog Release Announcement and the underlying changes landed through Gitea Pull Request #39501 and Gitea Pull Request #39507. The patched API handler now enforces DISABLE_NEW_PUSH consistently with the web interface.
Workarounds
- Set [mirror] ENABLED = false in app.ini to disable mirroring entirely until the patch is applied
- Restrict access to the /api/v1/repos/*/push_mirrors endpoint at the reverse proxy layer
- Remove repository administrator privileges from accounts that do not require them
- Review existing push mirrors regularly and remove any that are not on an approved list
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

