/

CVE-2026-56750

Severity:

CRITICAL RISK

(9.1)

Improper Access Control (CWE-284) in Gitea Remember-Me

CVE-2026-56750

Deferred

Vulnerability type

Category:

Improper Access Control

CWE:

CWE-284

Impact:

Account Takeover and Persistent Session Hijacking

Severity:

CRITICAL RISK

(9.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A critical Gitea session-management issue involving Remember-Me tokens may allow a stolen token to remain usable because the attacker's authenticated session is not invalidated as expected. The risk is greatest when a token is exposed and the affected account or session is subsequently revoked or otherwise expected to become invalid.

Affected context

The issue occurs in Gitea deployments that use Remember-Me authentication and rely on token invalidation to terminate sessions. It becomes relevant when an attacker obtains a valid Remember-Me token and the application's invalidation flow does not terminate the session associated with that token.

Exploit preconditions

  • Attack surface: Gitea authentication and session-management functionality
  • Required access: Possession of, or access to, a valid Remember-Me token
  • Trigger point: A token invalidation, logout, revocation, or related session-termination event
  • Why exploitation is possible: The invalidation process may fail to terminate the attacker's already-established authenticated session

Why this happens

The underlying issue is an access-control and session-lifecycle failure in which invalidating a Remember-Me credential does not consistently invalidate the authenticated session created from that credential. This leaves an authorization state active after the system intends to revoke it, mapping to CWE-284, Improper Access Control. The insecure pattern is treating token revocation and active-session termination as separate states without ensuring that both are enforced consistently.

Potential impact

  • An attacker may retain access to a victim's authenticated Gitea account.
  • The attacker could access private repositories, issues, and other permitted resources.
  • The attacker may modify repositories or account-controlled content.
  • A compromised account can be used for further organizational or supply-chain activity.

General mitigation guidance

Mitigation typically focuses on making credential revocation and session

termination part of one consistent security policy.

Common defensive patterns include:

  • Invalidate all sessions derived from a revoked Remember-Me token.
  • Use server-side session state that can be centrally revoked.
  • Apply short, bounded lifetimes and rotation for persistent authentication tokens.
  • Require reauthentication for sensitive account and repository-management actions.
  • Limit account and service privileges so a compromised session has minimal reach.
  • Protect tokens from exposure through secure cookie attributes, transport

protection, and controlled logging.

How teams detect issues like this

Organizations commonly detect related session-management weaknesses through:

  • Code review of token revocation, logout, and session-store interaction.
  • Static analysis checks for authentication paths that revoke credentials

without removing associated sessions.

  • Tests that verify previously established sessions stop authorizing requests

after token invalidation.

  • Monitoring for continued access from sessions associated with revoked tokens.
  • Policy enforcement requiring centralized revocation and reauthentication for

high-risk operations.

Automated security testing and code-review tools can help identify inconsistent

session-lifecycle behavior.

Sources

SourceLink
blog.gitea.comblog.gitea.com/gitea-1.27.0-is-released/
github.comgithub.com/go-gitea/gitea/releases/tag/v1.27.0
github.comgithub.com/go-gitea/gitea/security/advisories/GHSA-rgv6-xp99-6mgj

Frequently asked

questions

Potentially. If an attacker has obtained a valid Remember-Me token and the

Gitea instance is reachable, exploitation may not require local access to the

server.

Not necessarily. Possession of a usable Remember-Me token may be sufficient

for the affected session flow, depending on deployment and token protections.

Ensure that revoking a Remember-Me token also terminates every active session

derived from it, with server-side enforcement rather than client-side logout

alone.

Define and test a complete session-revocation policy, rotate persistent

credentials, protect authentication tokens, and require reauthentication for

sensitive actions.

Find out what's already
exploitable in your codebase.