Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSteal victim Remember-Me cookie out-of-band
-
DeliveryReplay token to autoSignIn endpoint
-
ExploitReceive rotated token, same ID
-
ExecutionVictim triggers hash-mismatch, only local cookie cleared
-
PersistAttacker token stays in database
-
ImpactPersistent 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. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv2 – 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)
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
Affected Packages
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
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
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.
Primary rating from Vendor (https://github.com/go-gitea/gitea).
CVSS VectorVendor: https://github.com/go-gitea/gitea
Lifecycle Timeline
3DescriptionCVE.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
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.
Apply vendor patch.
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
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
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
Authenticated command injection in Dokploy (self-hostable PaaS) versions 0.29.3 through 0.29.12 lets a low-privileged us
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
Same weakness CWE-613 – Insufficient Session Expiration
View allSame technique Information Disclosure
View allVendor StatusVendor
SUSE
Severity: Critical| Product | Status |
|---|---|
| SUSE Linux Enterprise Server 16.1 | Affected |
| SUSE Linux Enterprise Server for SAP applications 16.1 | Affected |
EUVD-2026-58145
GHSA-rgv6-xp99-6mgj
NVD
CVE.org
EPSS
Exploit-DB