Skip to main content

Gitea CVE-2026-56750

| EUVDEUVD-2026-58145 CRITICAL
Insufficient Session Expiration (CWE-613)
2026-07-21 https://github.com/go-gitea/gitea GHSA-rgv6-xp99-6mgj
9.1
CVSS 3.1 · Vendor: https://github.com/go-gitea/gitea
View

Attack ChainAIDerived

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

  1. Access
    Steal victim Remember-Me cookie out-of-band
  2. Delivery
    Replay token to autoSignIn endpoint
  3. Exploit
    Receive rotated token, same ID
  4. Execution
    Victim triggers hash-mismatch, only local cookie cleared
  5. Persist
    Attacker token stays in database
  6. Impact
    Persistent indefinite account access

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A07:2025 - Authentication Failures
ASVS 5.0
V7 - Session Management Session expiration enforcement
Exploitation Conditions

Exploitation requires the attacker to first obtain a valid victim Remember-Me (gitea_incredible) cookie out-of-band - via XSS, TLS/network interception, malware, or local/physical access to the victim's browser - and the Remember-Me feature must be in use on the target instance. Once a stolen token is replayed against POST /user/login (or any endpoint invoking autoSignIn), the attack succeeds because Gitea fails to delete the compromised token on hash-mismatch detection. Limiting factors: this is not a standalone remote-unauthenticated code path - the token theft is the hard prerequisite; instances that disable Remember-Me are not exploitable, and enforced TLS materially raises the difficulty of the required token capture. No user interaction by the victim is needed for the attacker to retain access.

Impact

The published CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:N/C:H/I:H/A:N, base 9.1) treats this as a trivial network attack, but that rating understates a critical precondition: the attacker must already possess the victim's Remember-Me cookie, obtained out-of-band via XSS, network interception, malware, or physical/local access. That prerequisite is what makes real-world likelihood far lower than the 9.1 suggests, and it is consistent with the low EPSS score of 0.16% (5th percentile). There is no CISA KEV listing and no public exploit identified at time of analysis, so this is exploited-conditionally rather than mass-exploitable. Where the score is fully justified is impact and persistence: once a token is stolen, this flaw removes the one automatic mechanism that would have evicted the attacker, converting a transient token theft into indefinite account control - so any operator whose users authenticate over untrusted networks or who has ever had a token-exposure incident should treat patching as urgent rather than routine. In short, high impact and high persistence, but gated by a meaningful precondition; prioritize based on your exposure to token theft, not on the 9.1 alone.

Exploit ScenarioDerived

An attacker who captures a victim's Gitea Remember-Me cookie (for example via a network intercept on an unencrypted or downgraded connection, or a shared/compromised workstation) replays it to autoSignIn and receives a freshly rotated token for the same ID. When the victim next uses their original cookie, Gitea detects the hash mismatch and logs the victim out locally but leaves the attacker's rotated token active in the database, so the attacker retains persistent access to the account and its repositories indefinitely. No public exploit code has been identified, and success depends on first obtaining a valid token out-of-band.

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

AnalysisAIv2 – Aug 14, 2026

Persistent account takeover in Gitea (self-hosted Git service) versions up to and including 1.26.4 arises because a stolen Remember-Me cookie is never revoked after theft is detected. When the split-token (ID:Hash) design detects a hash mismatch - the canonical signal of a compromised token per the Paragonie remember-me guidance - CheckAuthToken only returns ErrAuthTokenInvalidHash and autoSignIn merely clears the victim's local cookie, leaving the attacker's rotated token live in the database. The result is indefinite attacker access to the victim's account. Fixed in 1.27.0; no public exploit identified at time of analysis, and EPSS is low at 0.16%.

Earlier versions of this analysis (1)
v1 Jul 21, 2026 - 21:02

Persistent account takeover in Gitea versions prior to 1.27.0 arises because the Remember-Me (gitea_incredible) split-token design fails to revoke a compromised token after detecting hash-mismatch reuse. An attacker who has already stolen a victim's Remember-Me cookie authenticates, receives a rotated token under the same ID, and remains logged in indefinitely - because when the legitimate user's original token later triggers a detected hash mismatch, Gitea deletes only the victim's local cookie and never removes the compromised token row from the database. There is no public exploit identified at time of analysis, but the vendor has published GHSA-rgv6-xp99-6mgj and shipped a fix in 1.27.0.

RemediationAI

Vendor-released patch: upgrade to Gitea 1.27.0, which is the first release containing the fix (commits de4b8277e9cb576f2315fb03b5ab6478b42a1d31 and f69e15afe7496cc62e96dab244629c69eb31a7bf via PRs https://github.com/go-gitea/gitea/pull/38406 and https://github.com/go-gitea/gitea/pull/38426; advisory https://github.com/go-gitea/gitea/security/advisories/GHSA-rgv6-xp99-6mgj). If you cannot upgrade immediately, the most effective compensating control is to disable the Remember-Me feature so no long-lived auto-sign-in tokens exist to steal (trade-off: users must re-authenticate each session, reducing convenience). Additionally, because the bug only matters after a token is compromised, force-invalidate existing remember-me tokens for affected users - rotating the relevant secrets and clearing stored auth tokens will evict any attacker session that already exists (trade-off: all users are logged out and must sign in again). Enforcing HTTPS/HSTS and short cookie lifetimes reduces the token-theft avenue that this flaw depends on but does not fix the underlying missing revocation.

Affected VersionsENISA

Gitea Open Source Git Server 0 ≤1.26.4

Affected Packages

go code.gitea.io/gitea fix: 1.27.0
go gitea.dev fix: 1.27.0
euvd gitea_open_source_git_server no fix

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 3 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 self-hosted, lightweight Go-based Git service (package pkg:go/code.gitea.io/gitea). Its Remember-Me feature uses a split-token scheme: the cookie carries an ID and a Hash, where the ID identifies the stored token row and the Hash is rotated on each use to detect replay of a captured cookie. This design (modeled on the Paragonie secure remember-me pattern) assumes that a mismatch between the presented Hash and the stored Hash for a given ID means the token was cloned, and that all sessions bound to that token must be destroyed. The root cause maps to CWE-613 (Insufficient Session Expiration): the compromise-detection branch in services/auth/auth_token.go (CheckAuthToken) surfaces the mismatch as an error but never deletes the offending database row, so the rotation-based revocation guarantee is broken and the security benefit of the split-token design is nullified.

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 (https://github.com/go-gitea/gitea) PRIMARY 9.1 CRITICAL
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
vuln.today AI 7.4 HIGH

AC:H because exploitation depends on first stealing a valid Remember-Me token out-of-band; PR:N/UI:N since the stolen token needs no victim action or attacker privileges; C:H/I:H for full account access, A:N as availability is unaffected.

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

Primary rating from Vendor (https://github.com/go-gitea/gitea).

CVSS VectorVendor: https://github.com/go-gitea/gitea

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

Lifecycle Timeline

3
Analysis Updated
Aug 14, 2026 - 20:32 vuln.today
v2 - CVSS changed
CVSS changed
Aug 14, 2026 - 20:22 NVD
9.1 (CRITICAL)
CVE Published
Jul 21, 2026 - 20:20 cve.org
CRITICAL

DescriptionCVE.org

The vulnerability is in the Remember-Me (gitea_incredible) token validation logic, specifically when handling a compromised token (hash mismatch).

The vulnerable function is this one:

https://github.com/go-gitea/gitea/blob/689ace1ce28fd74244b8aa335d9928cdbf6b22f9/services/auth/auth_token.go#L33-L64

Affected Endpoint

POST /user/login (and any endpoint triggering autoSignIn via the Remember-Me cookie).

Description

Gitea implements Remember-Me cookies using a split token design (ID:Hash), citing the Paragonie secure remember-me guide. When a token is used, its Hash is rotated, but the ID remains the same.

If an attacker steals a user's Remember-Me token and uses it to authenticate, the attacker is issued a new rotated token (same ID, new Hash). When the legitimate user later attempts to use their original token, Gitea correctly detects a hash mismatch for the given ID.

According to the referenced Paragonie specification, this indicates a compromised token, and ALL active remember-me sessions for that user MUST be invalidated. However, Gitea's CheckAuthToken function simply returns ErrAuthTokenInvalidHash. The calling code (autoSignIn) catches this error and deletes the victim's local cookie via ctx.DeleteSiteCookie, but fails to delete the compromised token from the database.

As a result, the attacker's active session is never invalidated, and the attacker maintains persistent, indefinite access to the victim's account, entirely defeating the purpose of the split-token security design.

Executive ViewAI

Why It Matters

Gitea versions through 1.26.4 contain a critical flaw where stolen Remember-Me cookies are never revoked even after theft is detected, enabling indefinite persistent account takeover. This impacts self-hosted Git deployments and could give attackers sustained access to source code repositories and sensitive development infrastructure. Leadership should prioritize immediate patching as any account compromise results in permanent attacker access until the account token is manually cleared.

Business Impact: Severe
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.2%
Top 95% exploitable
Prevalence
Medium
popular self-hosted Git server, common but not universally deployed
Threat Intel
1
1 source
Data Quality
6 sources
Confidence: High

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· derived
Out-of-Cycle
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
Very High

Priority Score

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

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

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-72867 CRITICAL POC
9.9 Aug 10

Authenticated command injection in Dokploy (self-hostable PaaS) versions 0.29.3 through 0.29.12 lets a low-privileged us

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

Vendor StatusVendor

SUSE

Severity: Critical
Product Status
SUSE Linux Enterprise Server 16.1 Affected
SUSE Linux Enterprise Server for SAP applications 16.1 Affected

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