CVE-2026-103059

Gitea built-in SSH server authentication bypass through key case folding

Published Oct 6, 2026 CVSS 3.1 · 9.1 Critical EPSS < 1% KEV · Not listed
Description
When Gitea's built-in SSH server is enabled (`START_SSH_SERVER = true`), the presented public key was looked up with an SQL `LIKE` comparison of its encoded content, which is case-insensitive on some databases, including the default SQLite. An attacker who can construct a case variant of another user's registered RSA public key for which they can derive the private key could have that key matched to the victim's account and authenticate over SSH as that user. Keys are now looked up by fingerprint.

Analysis

AI-generated

Technical impact

When the built‑in SSH server in Gitea is active, the system resolves a client’s public key using an SQL LIKE comparison of the encoded key. On databases such as SQLite, LIKE is case‑insensitive, so an attacker who can create a case variation of a victim’s registered RSA public key can cause that key to be matched to the victim’s account. Because the key is then accepted for authentication, the attacker can assume the victim’s identity over SSH. The flaw therefore allows unauthorized SSH login and any actions that the legitimate user can perform, undermining confidentiality and integrity. This is an example of CWE-178 (Improper Case Folding) and CWE-305 (Improper Restriction of Access to a Resource).

Affected Systems

The vulnerability affects Gitea installations that enable the built‑in SSH server (START_SSH_SERVER = true). Any release prior to the change in 28.0.0, which increased key lookup to fingerprint comparison, is susceptible. No version scope is explicitly listed.

Risk and Exploitability

Exploitation requires an attacker who can generate a case‑variant of a target’s public key and also derive the matching private key. In practice, this means the attacker already possesses the victim’s private key, in which case the vulnerability simply provides a convenient authentication shortcut. The attack vector is remote, operating over the standard SSH connection, and does not require local privilege escalation or additional services. The CVSS score of 9.1 indicates critical severity, but the EPSS score of less than 1% shows a very low estimation of exploitation probability. The vulnerability is not currently listed in CISA’s KEV catalog.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade to Gitea version 28.0.0 or later to enable fingerprint‑based key lookup.
  • If SSH functionality is not required, disable the built‑in server by setting START_SSH_SERVER to false.
  • Limit SSH access to trusted users and enforce key fingerprint checks to prevent unauthorized logins.

Generated by OpenCVE AI on October 17, 2026 at 08:25 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
CPEs cpe:2.3:a:gitea:gitea:*:*:*:*:*:*:*:*
Type Values Removed Values Added
Weaknesses CWE-287
Type Values Removed Values Added
Weaknesses CWE-305
Metrics cvssV3_1

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

ssvc

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

Type Values Removed Values Added
First Time appeared Gitea
Gitea gitea
Vendors & Products Gitea
Gitea gitea
Type Values Removed Values Added
Weaknesses CWE-287
Type Values Removed Values Added
Description When Gitea's built-in SSH server is enabled (`START_SSH_SERVER = true`), the presented public key was looked up with an SQL `LIKE` comparison of its encoded content, which is case-insensitive on some databases, including the default SQLite. An attacker who can construct a case variant of another user's registered RSA public key for which they can derive the private key could have that key matched to the victim's account and authenticate over SSH as that user. Keys are now looked up by fingerprint.
Title Gitea built-in SSH server authentication bypass through key case folding
References
Weaknesses
  • CWE-178

    Improper Handling of Case Sensitivity

  • CWE-305

    Authentication Bypass by Primary Weakness

Sources

Status
PUBLISHED
Assigner
Gitea
Published
Updated
Oct 7, 2026, 2:17 PM
Reserved
Oct 4, 2026, 9:57 PM
Status
Analyzed
Published
Oct 6, 2026, 8:17 PM
Modified
Oct 15, 2026, 2:26 AM
Severity
Important
Public date
Oct 6, 2026, 7:22 PM