Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate as user with push access
-
DeliveryCraft oversized pre-receive hook input
-
ExploitTrigger bufio.Scanner error
-
ExecutionBranch-protection check fails open
-
ImpactPush accepted to protected branch
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V8 - Authorization Authorization logic validation
MITRE ATT&CK
1 technique across 1 tactic: Privilege Escalation The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires an authenticated Gitea account with push/write access to a target repository that has branch protection enabled - the whole point of the bug is to bypass those protections, so a repo without branch protection has nothing to bypass. The concrete trigger is supplying oversized pre-receive hook input (input exceeding bufio.Scanner's default 64KB token limit) so the scanner errors and the check is skipped. Limiting factors: the attacker must already be a permitted pusher (this is not unauthenticated despite the CVSS PR:N), the repository must actually enforce branch protection for there to be a security-relevant impact, and the affected version must be earlier than 1.26.0. |
| Impact | The published CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:N, C:H/I:H/A:H = 9.8) overstates real-world risk and conflicts with the description. The vulnerability requires the attacker to already be an authenticated Git user with push access to a repository, so PR:N (unauthenticated) is questionable - this is a privilege/authorization bypass, not remote code execution, and its true impact is integrity (writing to protected branches), not confidentiality or availability. EPSS is low (0.17%, 7th percentile), there is no KEV listing and no public POC, which is consistent with a narrow, insider-or-collaborator threat model rather than mass internet exploitation. Net: treat this as a meaningful integrity/governance control failure for organizations that rely on Gitea branch protection (e.g., to gate CI/CD or enforce review), but not the drive-by 9.8 RCE the raw score implies. Verify the auth precondition with the vendor patch/PR before deprioritizing. |
| Exploit ScenarioDerived | A developer with ordinary push rights to a repository wants to slip an unreviewed or malicious commit onto a protected branch that normally requires review. They craft a git push whose pre-receive hook input exceeds bufio.Scanner's buffer limit, causing Gitea to skip the branch-protection evaluation and accept the write. No public POC is currently identified, but the technique is low-complexity for anyone who already has repository access. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jul 06, 2026
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.
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.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 2 packages in go, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
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.
Know when Gitea gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
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
Lifecycle Timeline
2DescriptionCVE.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.
Executive ViewAI
Gitea self-hosted Git server (versions before 1.26.0) contains a branch-protection bypass vulnerability allowing users with push access to circumvent code review and compliance controls by triggering an unhandled scanner error. Organizations relying on branch protections for change governance risk unauthorized code merges and potential compliance violations; patch availability enables rapid remediation.
Apply vendor patch: v1.26.0
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.
Remote code execution in Gitea (self-hosted Git service) via a code-injection flaw (CWE-94) allows attackers to run arbi
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
Path traversal in Gitea's Org-mode (`.org`) markup renderer allows an attacker who can get Org-mode content rendered by
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
Authorization bypass in Gitea versions 1.22.3 through 1.26.1 allows holders of `public-only` access tokens or OAuth gran
An issue was discovered in Gitea through 1.11.5. Rated high severity (CVSS 7.5), this vulnerability is remotely exploita
Same weakness CWE-863 – Incorrect Authorization
View allSame technique Authentication Bypass
View allVendor StatusVendor
SUSE
Severity: Critical| Product | Status |
|---|---|
| SUSE Linux Enterprise Module for Package Hub 15 SP5 | Affected |
| SUSE Linux Enterprise Module for Package Hub 15 SP6 | Affected |
| openSUSE Leap 15.5 | Affected |
| openSUSE Leap 15.6 | Affected |
EUVD-2026-41638
GHSA-vhq7-fwwh-7hjf
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB