Junglewise Threat Intelligence

CVE-2026-58443: Gitea public-only token scope bypass in pull request updates

CVE-2026-58443 · Severity: critical · CVSS 9.6 · Published 2026-07-21

Technologies: code.gitea.io/gitea (Go), Gitea. Vendors: Go, Gitea.

Executive brief

Gitea is an open-source forge software package for hosting software development version control using Git. A vulnerability was discovered where security tokens restricted to public repositories could be used to modify private repositories through pull request updates. This could allow an attacker to inject code into private projects or trigger automated workflows in private environments, potentially leading to unauthorized access or data exposure.

Technical details

A logic flaw exists in Gitea's API where the 'public-only' restriction on access tokens is only validated against the base repository of a pull request. When the 'POST /api/v1/repos/{public-owner}/{public-repo}/pulls/{index}/update' endpoint is called, Gitea fails to re-verify the token's restrictions against the head repository if it is private. An attacker with a 'public-only' token and write permissions to a private repository can bypass the token's scope limitation to push commits into private branches. This can further be leveraged to trigger Gitea Actions workflows in the context of the private repository. The issue is fixed in version 1.27.0.

Affected products

  • Gitea Gitea < 1.27.0

Timeline

  • 2026-07-13: disclosed
  • 2026-07-21: advisory
  • 1.27.0: patched

References

Related threats