GHSA-3m6q-h5gj-7mrw: Gitea has insecure default SSH settings
Summary The built-in SSH server currently advertises a number of key exchange, MAC, and host key algorithms that are considered weak or broken. The defaults should be tightened so a fresh installation passes a baseline SSH security audit out of the box.
Published Apr 22, 2026
Affected packages
code.gitea.io/gitea
- Ecosystem
- Go
- Affected
- < 1.25.0
- Fixed in
- 1.25.0
- Check
go list -m code.gitea.io/gitea
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
Summary
The built-in SSH server currently advertises a number of key exchange, MAC, and host key algorithms that are considered weak or broken. The defaults should be tightened so a fresh installation passes a baseline SSH security audit out of the box.
Details
Running ssh-audit against a default deployment flags the following as fail:
- Key exchange
ecdh-sha2-nistp256ecdh-sha2-nistp384ecdh-sha2-nistp521- MAC
hmac-sha1- Host key
ssh-rsa
Reproduction
docker run -it --rm positronsecurity/ssh-audit -p 2222 gitea.localImpact
Default deployments expose algorithms that are known-weak or deprecated upstream. The current workaround requires manually setting several GITEA__server__SSH_SERVER_* variables, which most users will never do.
Workaround
[server]
SSH_SERVER_KEY_EXCHANGES = curve25519-sha256, diffie-hellman-group14-sha256
SSH_SERVER_CIPHERS = [email protected], aes128-ctr, aes192-ctr, aes256-ctr, [email protected], [email protected]
SSH_SERVER_MACS = [email protected], hmac-sha2-256There is no exposed option to restrict host key algorithms, so ssh-rsa remains advertised.
Acceptance criteria
- [ ] Default
SSH_SERVER_KEY_EXCHANGES,SSH_SERVER_CIPHERS, andSSH_SERVER_MACSupdated to the secure list above. - [ ] New
SSH_SERVER_HOST_KEY_ALGORITHMSoption added, with a default that excludesssh-rsa. - [ ] Documentation updated to reflect the new defaults.
- [ ]
ssh-auditagainst a fresh install reports no[fail]entries.
Credited to gnzsnz.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More Go vulnerabilities
All Go entriesCVE-2026-20779
Gitea: TOTP TOCTOU race on web 2FA paths + missing replay check on Basic-Auth `X-Gitea-OTP` surface
high7.1Jul 21, 2026CVE-2026-20896
Gitea Docker image: `REVERSE_PROXY_TRUSTED_PROXIES = *` default lets any source IP impersonate any user via `X-WEBAUTH-USER`
critical9.8Jul 21, 2026CVE-2026-22874
Gitea: Incomplete SSRF Protection in Webhook and Migration Allow-list Default Filter
critical9.6Jul 21, 2026CVE-2026-23603
Gitea: Blind SSRF in OAuth2 avatar synchronization via unvalidated OIDC picture claim
low3.1Jul 21, 2026CVE-2026-24451
Gitea: Fork Synchronization Continues After Parent Repository Changes from Public to Private
high7.5Jul 21, 2026CVE-2026-25038
Gitea: Unauthorized Access to Labels of Private Organizations
high7.5Jul 21, 2026
