Gitea: Authentication bypass in built-in SSH server via case-insensitive key lookup
Summary
Gitea's built-in SSH server looked up presented public keys with a case-insensitive SQL LIKE comparison. On SQLite, which is the default, an attacker can construct a case-variant RSA key that matches a registered key of another user and log in over SSH as that user. The attacker only needs the victim's public key, which Gitea publishes without authentication, and gains read and write access to the victim's repositories.
Affected
- Gitea 1.27.3 and earlier with the built-in SSH server enabled (START_SSH_SERVER = true) and SQLite
- The official rootless container image is affected without configuration changes
- Not affected: OpenSSH front-ends, SSH certificate login, HTTP signature authentication, and PostgreSQL
Fixed in
- Gitea 28.0.0 (keys are now looked up by fingerprint)
Workaround
- Disable the built-in SSH server (START_SSH_SERVER = false) and use the system OpenSSH daemon instead
- Note: the 28.0.0 upgrade contains breaking changes, so review the release notes before upgrading
Exploitation
- Exploitation in the wild: Unknown.
- Public proof of concept: Unknown.
- CISA SSVC: Automatable yes, technical impact total, exploitation none.
Our recommendation
- Upgrade to Gitea 28.0.0 or later as soon as possible, and check the releases page for newer fixed versions.
- If the built-in SSH server is not needed, disable it and use OpenSSH.
- Check whether START_SSH_SERVER is enabled and whether the instance is reachable from the internet.
- Review SSH login logs and repository access for unexpected key logins.
Public exploits
PoC-in-GitHub, Metasploit and Exploit-DB list nothing for this CVE.
Research sources
- GitHub Security Advisory GHSA-8pwg-hcgm-54cp github.com
- Gitea 28.0.0 release announcement blog.gitea.com
- Gitea v28.0.0 release github.com
- Fix pull request #39423 (fingerprint lookup) github.com
- OSV entry CVE-2026-103059 osv.dev
Researched and written up in English and German by an AI (Claude by Anthropic) based on NVD, CISA, EPSS and the sources listed. The vendor information is authoritative. Researched on 31 Oct 2026, 07:23.
Original description (NVD)
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.
Sources
The tracker combines official, freely usable data sources – updated continuously:
- NVD (NIST) – CVEs, rating (CVSS), affected products
- CISA KEV – vulnerabilities confirmed by CISA as actively exploited
- CISA Vulnrichment – CISA assessment (SSVC) in the official CVE record
- FIRST EPSS – probability of exploitation
- Microsoft MSRC – Patch Tuesday: vulnerabilities, severity, updates
- PoC-in-GitHub – public proof-of-concept repositories
- Metasploit (Rapid7) – modules of the Metasploit Framework
- Exploit-DB (OffSec) – archive of public exploits (links only)
- Patch days: official vendor pages (linked per vendor) (Vendor patch days)
This product uses data from the NVD API but is not endorsed or certified by the NVD. EPSS data © FIRST.org.
Affected? We can help.
We check whether your systems are affected, install updates and close the gap – continuously with the System Health Checker if you wish.
