Loading...
Skip to main content

CVE-2026-56750

CRITICAL

Gitea Remember-Me Token Theft Not Invalidating Attacker Session

Published July 21, 2026Updated July 27, 2026Source: osv

Summary

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](https://github.com/go-gitea/gitea/blob/689ace1ce28fd74244b8aa335d9928cdbf6b22f9/services/auth/auth_token.go#L21). 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.

Remediation

Upgrade to the fixed version using your package manager.

Go
Update code.gitea.io/gitea to 1.27.0 or later
go get code.gitea.io/gitea@v1.27.0

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (1)

PackageEcosystemAffectedFixed In
code.gitea.io/gitea
go
All versions1.27.0

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 8.6 score means for each attack dimension.

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

CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N

Frequently Asked Questions

What is CVE-2026-56750?
Gitea Remember-Me Token Theft Not Invalidating Attacker Session This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 8.6/10).
How do I check if my project is affected by CVE-2026-56750?
CVE-2026-56750 affects code.gitea.io/gitea. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-56750 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
8.6

High exploitability or significant impact. Prioritize remediation within days.

Also Known As

GHSA-rgv6-xp99-6mgj
GO-2026-6072

Related CVEs

  • CVE-2026-20896
    CRITICAL

    Gitea Docker image: `REVERSE_PROXY_TRUSTED_PROXIES = *` default lets any source IP impersonate any user via `X-WEBAUTH-USER`

  • CVE-2026-58426
    CRITICAL

    Gitea Actions Artifacts V4 signed URL HMAC ambiguity allows cross-repository artifact read and cross-task upload-state write

  • CVE-2026-58443
    CRITICAL

    Gitea: Public-only repository tokens can update private PR head branches

  • CVE-2026-58424
    HIGH

    Gitea: Permanent Fork PR Workflow Approval Gate Bypass

  • CVE-2026-57894
    HIGH

    Gitea: Repository Migration Follows Git HTTP Redirects After URL Allow/Block Validation, Enabling Internal Git Repository Exfiltration

  • CVE-2026-27771
    HIGH

    Gitea has insufficient permission checks for Composer package source links

  • CVE-2026-28737
    HIGH

    Gitea: Stored XSS via glTF `extensionsRequired` in Gitea 3D File Viewer

  • CVE-2026-26231
    HIGH

    Gitea: Authorization Bypass via "Allow edits from maintainers" allows unauthorized commits to any readable repo

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies