Advisory Database
  • Advisories
  • Dependency Scanning
  1. golang
  2. ›
  3. code.gitea.io/gitea
  4. ›
  5. CVE-2026-58443

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

July 21, 2026

Gitea allows a public-only,write:repository token to update a private pull request head branch through a public base repository route.

The vulnerable endpoint is:

POST /api/v1/repos/{public-owner}/{public-repo}/pulls/{index}/update

Gitea checks the token’s public-only restriction against the route repository, which is the public base repository. UpdatePullRequest() then authorizes the pull request head repository with ordinary user RBAC and calls the pull update service. If the head repository is private, the active token’s public-only restriction is not re-applied to that private repository before Gitea pushes changes into it.

As a result, the same token that cannot directly write to the private repository can still cause Gitea to push public base commits into the private head branch.

References

  • github.com/advisories/GHSA-xxjv-752h-3vp2
  • github.com/go-gitea/gitea/releases/tag/v1.27.0
  • github.com/go-gitea/gitea/security/advisories/GHSA-xxjv-752h-3vp2
  • nvd.nist.gov/vuln/detail/CVE-2026-58443

Code Behaviors & Features

Detect and mitigate CVE-2026-58443 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 1.27.0

Fixed versions

  • 1.27.0

Solution

Upgrade to version 1.27.0 or above.

Impact 9.6 CRITICAL

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-863: Incorrect Authorization

Source file

go/code.gitea.io/gitea/CVE-2026-58443.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 08 Aug 2026 00:18:46 +0000.