Severity by source
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Requires an authenticated user with repo push access (PR:L), so not PR:N; impact is writing to protected branches (I:H) with no confidentiality or availability loss.
Primary rating from Vendor (Gitea).
CVSS VectorVendor: Gitea
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Lifecycle Timeline
3DescriptionCVE.org
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.
AnalysisAI
Branch-protection bypass in Gitea's self-hosted Git server (all versions before 1.26.0) allows a user with push access to circumvent pre-receive hook enforcement by supplying oversized hook input that trips a bufio.Scanner error the code fails to handle safely. Because Gitea does not fail closed on the scanner error, the protection check is silently skipped and the push is accepted. No public exploit identified at time of analysis; EPSS is low (0.17%, 7th percentile) and this is not in CISA KEV, but a vendor patch (v1.26.0) is available.
Technical ContextAI
Gitea is a lightweight, self-hosted Git service written in Go, comparable to GitLab/Gitea/GitHub Enterprise for team code hosting. The flaw lives in the server-side pre-receive hook path that enforces branch protection (who may push, force-push, or delete protected refs). Go's bufio.Scanner has a default maximum token size (64KB) and returns bufio.ErrTooLong when a line exceeds it; the vulnerable code treats a Scanner error as an empty/complete read rather than an error condition, so oversized input causes the enforcement logic to terminate early without rejecting the push. This is CWE-863 (Incorrect Authorization): the security decision is reached through a code path that does not fail closed, so a control that should deny by default instead permits.
RemediationAI
Vendor-released patch: upgrade to Gitea 1.26.0 or later (https://github.com/go-gitea/gitea/releases/tag/v1.26.0), which corrects the pre-receive hook handling so bufio.Scanner errors fail closed (fix in https://github.com/go-gitea/gitea/pull/36963). Until you can upgrade, reduce exposure by restricting who holds push/write access to repositories with branch protection and audit collaborator lists, since exploitation requires an account able to push; where feasible, enforce protections through an external mechanism the Git server cannot bypass (e.g., server-side CI gates or a proxy that inspects pushes) rather than relying solely on Gitea's in-process check - with the trade-off of added pipeline complexity. Review push logs on protected branches for anomalous accepted pushes that should have been blocked.
Broken access control in Gitea's Composer package registry (versions up to and including 1.26.1) lets remote attackers r
Gitea before 1.16.7 does not escape git fetch remote. Rated high severity (CVSS 7.5), this vulnerability is remotely exp
The git hook feature in Gitea 1.1.0 through 1.12.5 might allow for authenticated remote code execution in customer envir
Improper Neutralization of Input During Web Page Generation (XSS or 'Cross-site Scripting') vulnerability in Gitea Gitea
Reverse-proxy authentication bypass in the official Gitea Docker image (versions up to and including 1.26.2) allows any
Container escape in Gitea act_runner (Docker backend, through act 0.262.0) lets an authenticated user with workflow-exec
models/repo_mirror.go in Gitea before 1.7.6 and 1.8.x before 1.8-RC3 mishandles mirror repo URL settings, leading to rem
Server-side request forgery and internal repository exfiltration in Gitea before 1.27.0 lets a low-privileged authentica
An issue was discovered in Gitea through 1.11.5. Rated high severity (CVSS 7.5), this vulnerability is remotely exploita
Missing Authorization in GitHub repository go-gitea/gitea prior to 1.16.4. Rated high severity (CVSS 7.1), this vulnerab
Open Redirect on login in GitHub repository go-gitea/gitea prior to 1.16.5. Rated medium severity (CVSS 6.1), this vulne
Authenticated command injection in Dokploy (self-hostable PaaS) versions 0.29.3 through 0.29.12 lets a low-privileged us
Same weakness CWE-863 – Incorrect Authorization
View allSame technique Authentication Bypass
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-41638
GHSA-vhq7-fwwh-7hjf