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

CVE-2026-27775: Gitea: Cached Per-Branch Permission Check in Pre-Receive Hook Allows Full Repository Write

July 21, 2026

The pre-receive hook in Gitea evaluates the CanMaintainerWriteToBranch permission only once per git push session and caches the result for all subsequent refs in the same batch. An attacker who has a legitimate per-branch write grant (e.g., via an open pull request with “Allow edits from maintainers” enabled) can batch-push that branch together with any other ref. The cached true from the first ref is reused for all following refs, allowing the attacker to overwrite protected branches (including main), create arbitrary new branches, and push tags. This effectively escalates a single-branch maintainer-edit grant into full repository write access.

References

  • blog.gitea.com/release-of-1.26.3-and-1.26.4
  • github.com/advisories/GHSA-649p-mmhf-85c7
  • github.com/go-gitea/gitea/commit/99f8b3d9a1d32f4c39828e07971455a18191e0b9
  • github.com/go-gitea/gitea/pull/38151
  • github.com/go-gitea/gitea/releases/tag/v1.26.3
  • github.com/go-gitea/gitea/security/advisories/GHSA-649p-mmhf-85c7
  • nvd.nist.gov/vuln/detail/CVE-2026-27775

Code Behaviors & Features

Detect and mitigate CVE-2026-27775 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.26.3

Fixed versions

  • 1.26.3

Solution

Upgrade to version 1.26.3 or above.

Impact 8.8 HIGH

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

Learn more about CVSS

Weakness

  • CWE-863: Incorrect Authorization

Source file

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

Spotted a mistake? Edit the file on GitLab.

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

Page generated Sat, 08 Aug 2026 00:19:20 +0000.