Skip to main content

Gitea CVE-2026-27780

| EUVDEUVD-2026-41638 CRITICAL
Incorrect Authorization (CWE-863)
2026-07-03 Gitea GHSA-vhq7-fwwh-7hjf
9.8
CVSS 3.1 · Vendor: Gitea
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Authenticate as user with push access
  2. Delivery
    Craft oversized pre-receive hook input
  3. Exploit
    Trigger bufio.Scanner error
  4. Execution
    Branch-protection check fails open
  5. Impact
    Push 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.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

Gitea Open Source Git Server 0 <1.26.0

Affected Packages

go code.gitea.io/gitea fix: 1.26.0
euvd gitea_open_source_git_server fix: 1.26.0

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

Vendor (Gitea) PRIMARY 9.8 CRITICAL
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
vuln.today AI 6.5 MEDIUM

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.

3.1 AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N
4.0 AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N
SUSE CRITICAL

Primary rating from Vendor (Gitea).

CVSS VectorVendor: Gitea

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

2
CVSS changed
Jul 06, 2026 - 16:22 NVD
9.8 (CRITICAL)
CVE Published
Jul 03, 2026 - 20:19 cve.org
UNKNOWN (no severity yet)

DescriptionCVE.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

Why It Matters

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.

Business Impact: High
Compensating Controls

Apply vendor patch: v1.26.0

Threat Intelligence Overview

EPSS Score
0.2%
Top 93% exploitable
Prevalence
Medium
popular self-hosted Git server, common but not ubiquitous in enterprises
Threat Intel
1
1 sources
Data Quality
6 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA Vendor GitHub

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.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC No
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
Yes
Human Impact
High
Technical Impact
Total

Priority Score

49
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +49
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.

More in Gitea

View all
CVE-2026-60004 CRITICAL POC
9.8

Remote code execution in Gitea (self-hosted Git service) via a code-injection flaw (CWE-94) allows attackers to run arbi

CVE-2026-27771 HIGH POC
8.2 Jul 03

Broken access control in Gitea's Composer package registry (versions up to and including 1.26.1) lets remote attackers r

CVE-2022-30781 HIGH POC
7.5 May 16

Gitea before 1.16.7 does not escape git fetch remote. Rated high severity (CVSS 7.5), this vulnerability is remotely exp

CVE-2020-14144 HIGH POC
7.2 Oct 16

The git hook feature in Gitea 1.1.0 through 1.12.5 might allow for authenticated remote code execution in customer envir

CVE-2024-6886 CRITICAL POC
10.0 Aug 06

Improper Neutralization of Input During Web Page Generation (XSS or 'Cross-site Scripting') vulnerability in Gitea Gitea

CVE-2026-20896 CRITICAL POC
9.8 Jul 03

Reverse-proxy authentication bypass in the official Gitea Docker image (versions up to and including 1.26.2) allows any

CVE-2026-59774 CRITICAL POC
9.8

Path traversal in Gitea's Org-mode (`.org`) markup renderer allows an attacker who can get Org-mode content rendered by

CVE-2026-58053 CRITICAL POC
9.4 Jun 28

Container escape in Gitea act_runner (Docker backend, through act 0.262.0) lets an authenticated user with workflow-exec

CVE-2019-11229 HIGH POC
8.8 Apr 15

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

CVE-2026-57894 HIGH POC
8.5 Jul 21

Server-side request forgery and internal repository exfiltration in Gitea before 1.27.0 lets a low-privileged authentica

CVE-2026-24791 HIGH POC
8.1 Jun 17

Authorization bypass in Gitea versions 1.22.3 through 1.26.1 allows holders of `public-only` access tokens or OAuth gran

CVE-2020-13246 HIGH POC
7.5 May 20

An issue was discovered in Gitea through 1.11.5. Rated high severity (CVSS 7.5), this vulnerability is remotely exploita

Vendor 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

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy