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-89182 Overview
CVE-2026-89182 is an authorization flaw in Gitea that allows authenticated users to bypass the [repository] FORCE_PRIVATE = true instance policy. When an administrator configures Gitea to force all new repositories as private, the post-receive hook still honored the repo.private=false push option during the creation of an empty repository via push. Any user with repository creation rights could publish a repository publicly, violating the configured policy. The default Gitea configuration does not enable FORCE_PRIVATE, so instances relying on defaults are not affected. The issue is tracked under CWE-863: Incorrect Authorization and was fixed in Gitea 28.1.0.
Critical Impact
Authenticated users on Gitea instances with FORCE_PRIVATE = true can create public repositories, exposing source code intended to remain private under instance policy.
Affected Products
- Gitea instances configured with [repository] FORCE_PRIVATE = true
- Gitea releases prior to v28.1.0
- Self-hosted Gitea deployments where users can create repositories via push
Discovery Timeline
- 2026-10-06 - CVE-2026-89182 published to the National Vulnerability Database (NVD)
- 2026-10-07 - Last updated in NVD database
Technical Details for CVE-2026-89182
Vulnerability Analysis
Gitea supports push options that let a client set repository metadata, such as repo.private=true|false, during a git push. When FORCE_PRIVATE is enabled, the server-side policy requires all new repositories to be private, regardless of client input. The post-receive hook responsible for provisioning an empty repository created via push failed to enforce this policy. Instead, it applied the repo.private=false push option supplied by the pushing user. The result is a conflict between the configured instance policy and the applied repository state, which is characteristic of an authorization enforcement failure categorized under CWE-863.
Root Cause
The root cause is missing policy evaluation in the push-driven repository creation path. The create-on-push code path accepted the repo.private push option without checking whether FORCE_PRIVATE overrides it. The web and API code paths that create repositories correctly honored FORCE_PRIVATE, but the push flow did not share that enforcement logic. The fix landed in pull request #39501 and pull request #39507, with release details in the Gitea 28.1.0 release notes.
Attack Vector
Exploitation requires an authenticated user with permission to create repositories on an instance where FORCE_PRIVATE = true is set. The user pushes to a new repository path and includes the push option -o repo.private=false. Gitea provisions the repository and the post-receive hook sets visibility to public, bypassing the private-by-default policy. No elevated privileges are required beyond standard user repository creation. The vulnerability does not enable code execution, data modification outside the attacker's own content, or denial of service — the impact is confined to improper visibility of attacker-controlled repositories. See GHSA-fx95-gwfc-grgc for the vendor advisory.
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-89182
Indicators of Compromise
- Public repositories owned by non-administrator users on instances where FORCE_PRIVATE = true is configured.
- Repository creation events originating from git push operations that include the repo.private=false push option.
- Audit log entries showing repository visibility set to public during initial post-receive processing by a standard user.
Detection Strategies
- Query the Gitea database or API for all repositories with private = false and cross-reference against expected policy; any user-owned public repository is a candidate for review.
- Review Gitea access logs for POST or receive-pack requests immediately preceded by push-option headers containing repo.private=false.
- Correlate repository creation timestamps with the FORCE_PRIVATE configuration change history to identify policy violations.
Monitoring Recommendations
- Enable Gitea audit logging and forward repository creation and visibility-change events to a centralized logging platform.
- Alert on any new public repository created by non-privileged accounts when instance policy requires private repositories.
- Periodically scan the repository inventory with the Gitea API endpoint /repos/search?private=false and reconcile results against policy expectations.
How to Mitigate CVE-2026-89182
Immediate Actions Required
- Upgrade to Gitea v28.1.0 or later, which contains the enforcement fix.
- Audit all existing user-created repositories on affected instances and set visibility to private where it conflicts with FORCE_PRIVATE policy.
- Notify repository owners of any repositories reverted to private so they can validate access and content exposure history.
Patch Information
The fix is included in Gitea 28.1.0. The relevant code changes are in pull request #39501 and pull request #39507. Release details are available in the Gitea 28.1.0 release notes and the GitHub Security Advisory GHSA-fx95-gwfc-grgc.
Workarounds
- Restrict repository creation permissions to a trusted administrator group until the patch is applied.
- Disable create-on-push by setting [repository] ENABLE_PUSH_CREATE_USER = false and ENABLE_PUSH_CREATE_ORG = false in app.ini, which blocks the vulnerable code path.
- Implement a scheduled job that enumerates repositories and resets visibility to private on instances where FORCE_PRIVATE = true.
# Configuration example: disable push-based repository creation in app.ini
[repository]
FORCE_PRIVATE = true
ENABLE_PUSH_CREATE_USER = false
ENABLE_PUSH_CREATE_ORG = false
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

