---
id: "CVE-2026-104627"
kind: "vulnerability"
aliases: ["CVE-2026-104627"]
title: "Gitea: OpenID linking callback lets an attacker take over a signed-in account"
severity: "medium"
cvss: 5.4
epss: null
exploited: false
status: "open"
category: "other"
products: []
ecosystems: []
tags: ["gitea", "openid", "other", "self-hosted"]
not_affected_if: ["no-openid-linking", "openid-disabled"]
published_at: "2026-10-18T19:16:32+00:00"
first_seen_at: "2026-10-23T21:57:17+00:00"
updated_at: "2026-10-25T04:16:52+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-104627", "first_seen_at": "2026-10-23T21:57:17+00:00"}]
---

# Gitea: OpenID linking callback lets an attacker take over a signed-in account

Gitea's OpenID 2.0 account-linking callback accepted assertions that the signed-in user never started, so an attacker-controlled OpenID provider could attach its identity to a victim's account. The attacker could then log in as the victim through OpenID, which skips the local TOTP and WebAuthn checks.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check the Gitea version with `gitea --version` or the footer of the web UI, and compare against the fixed release in the advisory (unknown in sources).
- Check whether OpenID sign-in is enabled under the Gitea admin settings (unknown in sources whether it is on by default).

## Fix

- Upgrade Gitea to a release that includes the fix; the fixed version is unknown in the sources.
- Until upgraded, disable OpenID sign-in or OpenID account linking in the Gitea settings.

## Timeline

- 2026-10-23T21:57:17+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-104627

## From the sources

The Gitea OpenID association callback in the security settings accepted a positive OpenID 2.0 assertion without checking that the signed-in user had started the linking. Because OpenID 2.0 allows unsolicited assertions, an attacker-controlled OpenID provider could attach the attacker's identity to the account of a signed-in victim who opened a crafted link, and the attacker could then sign in as the victim through OpenID login, which does not apply the local TOTP or WebAuthn checks. The callback now requires a time-limited `state` value bound to the user.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
