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.
Published: 2026-10-06
Score: 9.1 Critical
EPSS: < 1% Very Low
KEV: No
Impact: Authentication Bypass
Action: Patch
AI Analysis

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.

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

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

History

Fri, 16 Oct 2026 12:30:00 +0000

Type Values Removed Values Added
Weaknesses CWE-178
References
Metrics threat_severity

None

threat_severity

Important


Thu, 15 Oct 2026 02:45:00 +0000

Type Values Removed Values Added
CPEs cpe:2.3:a:gitea:gitea:*:*:*:*:*:*:*:*

Wed, 07 Oct 2026 17:30:00 +0000

Type Values Removed Values Added
Weaknesses CWE-287

Wed, 07 Oct 2026 15:30:00 +0000

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


Tue, 06 Oct 2026 23:30:00 +0000

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

Tue, 06 Oct 2026 21:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-287

Tue, 06 Oct 2026 19:30:00 +0000

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

cve-icon MITRE

Status: PUBLISHED

Assigner: Gitea

Published:

Updated: 2026-10-07T14:17:20.596Z

Reserved: 2026-10-04T21:57:35.559Z

Link: CVE-2026-103059

cve-icon Vulnrichment

Updated: 2026-10-07T14:16:38.441Z

cve-icon NVD

Status : Analyzed

Published: 2026-10-06T20:17:14.377

Modified: 2026-10-15T02:26:26.567

Link: CVE-2026-103059

cve-icon Redhat

Severity : Important

Publid Date: 2026-10-06T19:22:57Z

Links: CVE-2026-103059 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-10-17T08:30:05Z

Weaknesses
  • CWE-178

    Improper Handling of Case Sensitivity

  • CWE-305

    Authentication Bypass by Primary Weakness