Gitea
Gitea SSH certificate principal impersonation of other users
Gitea resolved the principals of an SSH certificate by searching the content of all stored public keys instead of only principal keys. When Gitea trusts a user certificate authority (`SSH_TRUSTED_USER_CA_KEYS`) and accepts arbitrary principals (`SSH_AUTHORIZED_PRINCIPALS_ALLOW=anything`), a user could register another user's public key line as their own principal, or a holder of a certificate signed by that authority could list it, and then authenticate as the owner of that key through the HTTP signature API and the built-in SSH server. Instances that do not trust a user certificate authority are not affected.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- <= 28.1.0
Mitigation
The record names no fix. Check the vendor advisory below.
References
- Vendor advisory github.com/go-gitea/gitea/security/advisories/…
- Patch github.com/go-gitea/gitea/pull/39839
- Patch github.com/go-gitea/gitea/pull/39847
2 more
- Release notes blog.gitea.com/release-of-28.2.0
- Release notes github.com/go-gitea/gitea/releases/tag/v28.2.0
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.