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.
Published: 2026-10-18
Score: 7.5 High
EPSS: < 1% Very Low
KEV: No
Impact: Unauthorized Authentication via User Impersonation
Action: Patch Immediately
AI Analysis

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.

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

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 yet.

History

Mon, 02 Nov 2026 17:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

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


Tue, 20 Oct 2026 12:45:00 +0000

Type Values Removed Values Added
Weaknesses CWE-287

Tue, 20 Oct 2026 01:30:00 +0000

Type Values Removed Values Added
Weaknesses CWE-287

Tue, 20 Oct 2026 00:30:00 +0000

Type Values Removed Values Added
First Time appeared Gitea
Gitea gitea
Vendors & Products Gitea
Gitea gitea

Mon, 19 Oct 2026 21:30:00 +0000

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'}


Sun, 18 Oct 2026 21:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-287

Sun, 18 Oct 2026 19:00:00 +0000

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

cve-icon MITRE

Status: PUBLISHED

Assigner: Gitea

Published:

Updated: 2026-11-02T16:45:21.932Z

Reserved: 2026-10-14T20:08:45.856Z

Link: CVE-2026-109553

cve-icon Vulnrichment

Updated: 2026-10-19T20:18:57.653Z

cve-icon NVD

Status : Awaiting Analysis

Published: 2026-10-18T19:16:32.997

Modified: 2026-11-02T17:17:35.133

Link: CVE-2026-109553

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-20T07:30:11Z

Weaknesses