Skip to main content
Vulnerability Database/CVE-2026-97204

CVE-2026-97204: Label Deletion Auth Bypass Vulnerability

CVE-2026-97204 is an authorization bypass flaw in label management that allows users to delete organization labels by exploiting ID sequence overlap. This post explains its impact, affected systems, and mitigation steps.

Published:

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-97204 Overview

CVE-2026-97204 is an authorization flaw in Gitea's label deletion endpoint. The vulnerability stems from Gitea comparing the repository ID in a delete request against the organization ID when evaluating organization-scoped labels. Because repository IDs and organization IDs share the same numeric sequence, the two namespaces overlap. A user with write access to issues in a repository can delete labels belonging to an organization that happens to share the same numeric identifier as that repository. The issue is tracked under [CWE-863: Incorrect Authorization] and resolved in Gitea v28.2.0.

Critical Impact

An authenticated user with repository write access can delete organization-level labels when the organization ID matches the repository ID, corrupting issue triage metadata across projects owned by the organization.

Affected Products

  • Gitea self-hosted Git service (versions prior to v28.2.0)
  • Gitea deployments exposing repositories alongside organization-managed label sets
  • Downstream distributions bundling vulnerable Gitea releases

Discovery Timeline

  • 2026-10-18 - CVE-2026-97204 published to the National Vulnerability Database
  • 2026-10-19 - Last updated in NVD database

Technical Details for CVE-2026-97204

Vulnerability Analysis

Gitea organizes labels into two scopes: repository labels and organization labels. The delete label handler accepts an ID path parameter and must verify the caller is authorized to remove the target label. The vulnerable logic compares the repository ID from the request context to the organization ID stored on organization-scoped labels. Repository and organization identifiers in Gitea are drawn from the same auto-incrementing sequence, so collisions between a repository ID and an organization ID are possible.

When the two IDs coincide, the authorization check incorrectly treats a caller with write access on the repository as authorized to delete labels owned by the matching organization. The flaw does not expose label content and does not corrupt code or user data, but it does permit tampering with triage metadata used across every repository that inherits the organization's labels.

Root Cause

The root cause is an identifier-scope confusion inside the label deletion authorization check. Gitea treats a numeric ID match as proof of ownership without first validating that the ID belongs to the same object type (repository versus organization). This is a classic [CWE-863] authorization defect where the policy decision depends on comparing values from different trust domains.

Attack Vector

Exploitation requires an authenticated account with write access to issues on a repository whose numeric ID collides with an organization ID. The attacker issues a label delete request through the Gitea web UI or REST API against an organization label identifier. The server resolves the caller's repository context, finds matching numeric IDs, and deletes the organization label. No user interaction from the victim is required. The attack is remote over the network but constrained by the need for an ID collision and valid repository write privileges.

No public proof-of-concept exploit code is available. Technical details are documented in GitHub Security Advisory GHSA-fxq4-gr55-7x5g and the remediation pull requests #39743 and #39752.

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 Attacks

Detection Methods for CVE-2026-97204

Indicators of Compromise

  • Unexpected DELETE requests against /api/v1/repos/{owner}/{repo}/labels/{id} or /api/v1/orgs/{org}/labels/{id} endpoints originating from users without organization owner rights.
  • Gitea audit log entries showing organization labels removed by accounts whose permissions are limited to a single repository.
  • Sudden disappearance of organization-scoped labels across multiple repositories sharing the same organization owner.

Detection Strategies

  • Correlate label delete events in Gitea access logs with the acting user's organization role to flag deletions performed by non-owners.
  • Compare repository IDs and organization IDs in the Gitea database to identify numeric collisions that create exploitable conditions.
  • Alert on label delete API calls where the target label org_id differs from the authenticating user's organization memberships.

Monitoring Recommendations

  • Forward Gitea application and reverse-proxy logs to a central SIEM and retain delete-method audit events for at least 90 days.
  • Baseline normal label administration activity and generate alerts when delete rates exceed expected thresholds.
  • Monitor the Gitea release feed and GitHub Security Advisory channel for follow-up fixes referencing GHSA-fxq4-gr55-7x5g.

How to Mitigate CVE-2026-97204

Immediate Actions Required

  • Upgrade all Gitea instances to v28.2.0 or later, which deletes labels only within their own repository or organization scope.
  • Audit organization label inventories before and after upgrade to detect any labels removed by the vulnerable code path.
  • Review repository write grants and remove unnecessary issue-write permissions for untrusted accounts.

Patch Information

The fix ships in Gitea v28.2.0. The patch enforces scope-aware authorization so repository-context requests cannot act on organization-owned labels. Review the Gitea 28.2.0 release announcement, the v28.2.0 release tag, and the corrective pull requests #39743 and #39752 for the exact code changes.

Workarounds

  • Restrict issue write access on repositories whose numeric IDs collide with existing organization IDs until the upgrade is applied.
  • Place the Gitea API behind a reverse proxy that denies DELETE requests to label endpoints for non-administrative accounts.
  • Back up organization labels regularly so that unauthorized deletions can be restored from a known-good state.

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

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.