Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

Gitea: Public-only repository tokens can update private PR head branches (CVE-2026-58443)

0
Critical
Published: 07/21/2026 (07/21/2026, 20:38:06 UTC)
Source: GCVE Database
Product: code.gitea.io/gitea

Description

Gitea contains a critical vulnerability (CVE-2026-58443) where a token restricted to public repositories with write permissions can update the head branch of a private pull request. This occurs because the public-only restriction is checked against the public base repository route but not re-applied when updating the private head repository branch. Consequently, the token can push changes into private branches indirectly, bypassing intended access controls.

CVSS v3.1

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Changed
Confidentiality
None
Integrity
High
Availability
High
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:H/A:H

Affected software

Goghsa
code.gitea.io/gitea
Affected versions
<1.27.0

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 07/22/2026, 00:50:05 UTC

Technical Analysis

The vulnerability in Gitea arises from improper enforcement of the 'public-only' token restriction in the pull request update API endpoint POST /api/v1/repos/{public-owner}/{public-repo}/pulls/{index}/update. While the token is validated as public-only against the public base repository route, the subsequent authorization for updating the pull request head branch uses normal user RBAC on the head repository without re-checking the public-only restriction. If the head repository is private, this allows a public-only token to push commits into the private head branch, violating access controls. The issue stems from the route-level public-only check being applied only to the base repository and not to the private head repository during the update operation.

Potential Impact

An attacker or user possessing a public-only, write:repository token can indirectly modify private repository branches by updating pull request head branches. This bypasses the intended access control restrictions, potentially leading to unauthorized code changes in private repositories. The vulnerability does not disclose data but allows integrity violations by pushing commits into private branches without direct write access. This can compromise the integrity of private codebases.

Mitigation Recommendations

Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, avoid using public-only tokens with write permissions on repositories involved in pull requests that include private head branches. Monitor vendor communications for patches addressing this issue and apply them promptly once released.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
GHSA-xxjv-752h-3vp2
Osv Schema Version
1.4.0
Aliases
["CVE-2026-58443"]
Ecosystems
["Go"]
Database Specific Severity
CRITICAL
Cvss Version
3.1

Threat ID: 6a600ab79c2644c7f8fe24f9

Added to database: 07/22/2026, 00:11:35 UTC

Last enriched: 07/22/2026, 00:50:05 UTC

Last updated: 07/22/2026, 01:56:11 UTC

Views: 5

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses