Описание
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.
A flaw was found in Gitea. When the built-in Secure Shell (SSH) server is enabled, public keys are evaluated using a case-insensitive comparison on certain database systems. A remote attacker who constructs a case variant of an existing user's registered public key and possesses the corresponding private key can authenticate as that user over SSH. This flaw allows an attacker to bypass authentication and gain unauthorized access to victim accounts.
Отчет
An IMPORTANT severity flaw was found in Gitea, which is bundled in Red Hat's Konflux pipelines-as-code controller and watcher container images. When Gitea's built-in SSH server is enabled (START_SSH_SERVER = true), the presented public key is looked up with an SQL LIKE comparison of its encoded content, which is case-insensitive on some database backends, including the default SQLite. A remote, unauthenticated attacker who can construct a case variant of another user's registered RSA public key and derive the corresponding private key can have that key matched to the victim's account and authenticate over SSH as that user. This bypasses authentication and gives the attacker unauthorized access to the victim's account, including read access to private repositories and the ability to push code with the victim's identity. Red Hat assigned this flaw a CVSS 3.1 score of 7.4 (AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N); the high attack complexity reflects the non-default built-in SSH server configuration, the case-insensitive database prerequisite, and the difficulty of forging a case-variant RSA key pair. This rating is lower than the CISA score of 9.1, which assumes low attack complexity. The affected Red Hat products are handled through a delegated resolution, and a fix is being pursued for the affected Konflux pipelines-as-code images. Upstream resolved the issue by looking up SSH public keys by fingerprint instead of by content comparison.
Меры по смягчению последствий
Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability.
Ссылки на источники
Дополнительная информация
Статус:
EPSS
7.4 High
CVSS3
Связанные уязвимости
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.
ALT-PU-2026-18334: package `gitea` update to version 28.1.0-alt1
EPSS
7.4 High
CVSS3