Description
With `[repository] FORCE_PRIVATE = true`, Gitea creates new repositories as private, but the post-receive hook still applied the `repo.private=false` push option to an empty repository created by push. Any user who can create repositories could make their new repository public in violation of the instance policy. The default configuration is not affected.
Published: 2026-10-06
Score: 5.4 Medium
EPSS: < 1% Very Low
KEV: No
Impact: Unauthorized public repository creation
Action: Patch Required
AI Analysis

Impact

Gitea misapplies the FORCE_PRIVATE configuration when creating empty repositories on push. After a repository is pushed to a newly created empty repo, the post‑receive hook resets the privacy flag to false, overriding the instance policy that Force‑Private is set to true. The result is that any user who can create repositories will inadvertently create a public repository, violating the policy. This represents an authorization bypass, identified as CWE‑863.

Affected Systems

The vulnerability affects all Gitea releases that expose the FORCE_PRIVATE setting, specifically instances running Gitea up to and including version 28.1.0 prior to the fix. The default configuration is not altered, so the issue manifests only when administrators explicitly enable FORCE_PRIVATE and grant repository creation rights to authenticated users.

Risk and Exploitability

The exploit requires a user with repository creation privileges, a common role in many teams. While the escalation does not provide code execution or compromising system services, it allows an attacker to publish private code publicly, potentially exposing sensitive data. The CVSS score is 5.4, and EPSS is not available; the vulnerability is not listed in the CISA KEV catalog, suggesting limited exploitation data. Nevertheless, the impact on confidentiality and internal policy compliance is significant, and the attack vector is straightforward: provoke the creation of a repository via a compromised or malicious account.

Generated by OpenCVE AI on October 7, 2026 at 13:38 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply the Gitea 28.1.0 release or later, which contains the fix for the FORCE_PRIVATE flag bypass.
  • If an immediate upgrade is not feasible, disable or restrict the FORCE_PRIVATE configuration to trusted administrators only, and deny general repository creation permissions to other users.
  • Monitor repository creation events for any newly created public repositories and enforce instance policies that disallow public visibility for repositories created by non‑admin users.

Generated by OpenCVE AI on October 7, 2026 at 13:38 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Tue, 13 Oct 2026 18:15:00 +0000

Type Values Removed Values Added
CPEs cpe:2.3:a:gitea:gitea:*:*:*:*:*:*:*:*

Wed, 07 Oct 2026 12:30:00 +0000

Type Values Removed Values Added
Metrics cvssV3_1

{'score': 5.4, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N'}

ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Wed, 07 Oct 2026 04:45:00 +0000

Type Values Removed Values Added
First Time appeared Gitea
Gitea gitea
Vendors & Products Gitea
Gitea gitea

Tue, 06 Oct 2026 21:45:00 +0000

Type Values Removed Values Added
Description With `[repository] FORCE_PRIVATE = true`, Gitea creates new repositories as private, but the post-receive hook still applied the `repo.private=false` push option to an empty repository created by push. Any user who can create repositories could make their new repository public in violation of the instance policy. The default configuration is not affected.
Title Gitea push-to-create bypass of FORCE_PRIVATE policy
Weaknesses CWE-863
References

cve-icon MITRE

Status: PUBLISHED

Assigner: Gitea

Published:

Updated: 2026-10-07T11:34:42.708Z

Reserved: 2026-10-04T22:02:04.881Z

Link: CVE-2026-89182

cve-icon Vulnrichment

Updated: 2026-10-07T11:33:37.603Z

cve-icon NVD

Status : Analyzed

Published: 2026-10-06T22:17:07.690

Modified: 2026-10-13T18:03:37.053

Link: CVE-2026-89182

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-07T13:45:06Z

Weaknesses