CVE-2026-27780 Gitea pre-receive hook can miss branch-protection checks after scanner errors
Attackers can bypass branch-protection checks in Gitea by sending oversized input that causes scanner errors, allowing unauthorized code pushes.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2026-27780?
CVE-2026-27780 is a critical vulnerability in Gitea Open Source Git Server, published on 3 Jul 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
Gitea versions before 1.26.0 do not fail closed on bufio.Scanner errors while processing pre-receive hook input, allowing oversized input to bypass branch-protection checks.
Weakness: CWE-863
Which versions are affected by CVE-2026-27780?
3 open source packages ship an affected version, including code.gitea.io/gitea.
| Package | Affected | Fixed in |
|---|---|---|
code.gitea.io/gitea Go | All versions | 1.26.0 |
code.gitea.io/gitea Go | All versions | 1.26.0 |
code.gitea.io/gitea Go | All versions | 1.26.0 |
How do I fix CVE-2026-27780?
Upgrade code.gitea.io/gitea to 1.26.0 or later.
Is CVE-2026-27780 being exploited?
There is no known exploitation of CVE-2026-27780 in the wild and no public exploit code.
Sources
Also known as GHSA-vhq7-fwwh-7hjf, GO-2026-6346.