---
id: "CVE-2026-109553"
kind: "vulnerability"
aliases: ["CVE-2026-109553"]
title: "Gitea: SSH certificate principals let attackers log in as other users"
severity: "high"
cvss: 7.5
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["git", "gitea", "package", "self-hosted", "ssh"]
not_affected_if: ["default-config", "no-user-ca"]
published_at: "2026-10-18T19:16:32+00:00"
first_seen_at: "2026-10-23T21:57:17+00:00"
updated_at: "2026-10-25T03:23:30+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-109553", "first_seen_at": "2026-10-23T21:57:17+00:00"}]
---

# Gitea: SSH certificate principals let attackers log in as other users

Gitea matched SSH certificate principals against the contents of every stored public key, not only principal keys. With a trusted user certificate authority and arbitrary principals allowed, an attacker can register another user's key line as their principal and authenticate as that user over SSH.

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

## How to check

- Check whether `SSH_TRUSTED_USER_CA_KEYS` is set in the Gitea configuration file (app.ini or environment).
- Check whether `SSH_AUTHORIZED_PRINCIPALS_ALLOW` is set to `anything`.
- Check the installed Gitea version with `gitea --version`.

## Fix

- Upgrade Gitea to the patched release listed in the advisory (fixed version unknown from the sources).
- Set `SSH_AUTHORIZED_PRINCIPALS_ALLOW` to a restrictive value instead of `anything` until upgraded.
- Remove `SSH_TRUSTED_USER_CA_KEYS` if no user certificate authority is needed.

## Timeline

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

## From the sources

Gitea resolved the principals of an SSH certificate by searching the content of all stored public keys instead of only principal keys. When Gitea trusts a user certificate authority (`SSH_TRUSTED_USER_CA_KEYS`) and accepts arbitrary principals (`SSH_AUTHORIZED_PRINCIPALS_ALLOW=anything`), a user could register another user's public key line as their own principal, or a holder of a certificate signed by that authority could list it, and then authenticate as the owner of that key through the HTTP signature API and the built-in SSH server. Instances that do not trust a user certificate authority are not affected.

---

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