When Giteas 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 users registered RSA public key for which they can derive the private key could have that key matched to the victims account and authenticate over SSH as that user. Keys are now looked up by fingerprint.
The authentication algorithm is sound, but the implemented mechanism can be bypassed as the result of a separate weakness that is primary to the authentication error.
| Name | Vendor | Start Version | End Version |
|---|---|---|---|
| Gitea | Gitea | * | 28.0.0 (excluding) |