CVE-2026-109553

Gitea SSH certificate principal impersonation of other users

Published Oct 18, 2026 CVSS 3.1 · 7.5 High EPSS < 1% KEV · Not listed
Description
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.

Analysis

AI-generated

Technical impact

Gitea incorrectly interprets SSH certificate principals by scanning all stored public keys instead of matching against the designated principal key. When the instance trusts a user certificate authority and allows arbitrary principals, a malicious user can register or supply another user’s public key line as their own principal. Through the HTTP signature API or the built‑in SSH server, the attacker can then authenticate as the target user, achieving full impersonation of legitimate accounts. This results in unauthorized access to repositories and potentially sensitive data, violating confidentiality, integrity, and availability of the service.

Affected Systems

Based on the description, the flaw impacts all Gitea installations that trust a user certificate authority and enable arbitrary principal acceptance. Versions prior to 28.2.0 are vulnerable; the 28.2.0 release and later include the necessary verification fix. Instances that do not trust a user certificate authority are not affected.

Risk and Exploitability

Exploitation requires only a certificate signed by the trusted CA or the ability to submit a valid public key line belonging to another user, and does not necessitate local privileges. The attacker can carry out the attack remotely via the HTTP signature endpoint or by connecting to the built‑in SSH server. The CVSS score of 7.5 indicates a high severity, and the EPSS score of less than 1% shows low but non‑zero exploitation probability. The vulnerability is not listed in CISA’s KEV catalog. The combination of remote attack surface, impersonation capability, and high severity makes this a critical risk that should be patched promptly.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply the Gitea 28.2.0 release (or a later version) that includes the fixed SSH principal validation logic.
  • If an immediate upgrade is not possible, remove or restrict the SSH_TRUSTED_USER_CA_KEYS configuration so that the instance does not trust arbitrary user certificate authorities and do not permit arbitrary principals.
  • Configure SSH_AUTHORIZED_PRINCIPALS_ALLOW to a restrictive set rather than "anything" to ensure that only explicitly allowed principals are accepted.

Generated by OpenCVE AI on October 20, 2026 at 07:19 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
Weaknesses CWE-287
Type Values Removed Values Added
Weaknesses CWE-287
Type Values Removed Values Added
First Time appeared Gitea
Gitea gitea
Vendors & Products Gitea
Gitea gitea
Type Values Removed Values Added
Metrics cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H'}

Type Values Removed Values Added
Weaknesses CWE-287
Type Values Removed Values Added
Description 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.
Title Gitea SSH certificate principal impersonation of other users
References
Weaknesses

Sources

Status
PUBLISHED
Assigner
Gitea
Published
Updated
Nov 2, 2026, 4:45 PM
Reserved
Oct 14, 2026, 8:08 PM
Status
Awaiting Analysis
Published
Oct 18, 2026, 7:16 PM
Modified
Nov 2, 2026, 5:17 PM