Skip to main content

Gitea EUVDEUVD-2026-58145

| CVE-2026-56750 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
Share

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
qualitative
Red Hat
8.1 HIGH
qualitative

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

6
Analysis Updated
Aug 14, 2026 - 20:32 vuln.today
v2 (cvss_changed)
Re-analysis Queued
Aug 14, 2026 - 20:22 vuln.today
cvss_changed
CVSS changed
Aug 14, 2026 - 20:22 NVD
9.1 (CRITICAL)
Source Code Evidence Fetched
Jul 21, 2026 - 21:02 vuln.today
Analysis Generated
Jul 21, 2026 - 21:02 vuln.today
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.

AnalysisAI

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

Technical ContextAI

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.

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.

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

CVE-2022-0905 HIGH POC
7.1 Mar 10

Missing Authorization in GitHub repository go-gitea/gitea prior to 1.16.4. Rated high severity (CVSS 7.1), this vulnerab

Vendor StatusVendor

SUSE

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

Share

EUVD-2026-58145 vulnerability details – vuln.today

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