code.gitea.io/gitea
Affected
- introduced
0, fixed1.25.0(semver)
Fixed versions
1.25.0
Fix
- Fixed version
1.25.0go get code.gitea.io/[email protected]
Advisory
Also known as: GO-2026-5091
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.
Details
Running ssh-audit against a default deployment flags the following as fail:
ecdh-sha2-nistp256ecdh-sha2-nistp384ecdh-sha2-nistp521hmac-sha1ssh-rsaReproduction
docker run -it --rm positronsecurity/ssh-audit -p 2222 gitea.local
Impact
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-256
There is no exposed option to restrict host key algorithms, so ssh-rsa remains advertised.
Acceptance criteria
SSH_SERVER_KEY_EXCHANGES, SSH_SERVER_CIPHERS, and SSH_SERVER_MACS updated to the secure list above.SSH_SERVER_HOST_KEY_ALGORITHMS option added, with a default that excludes ssh-rsa.ssh-audit against a fresh install reports no [fail] entries.Medium Basis: The source's own band: MODERATE
0, fixed 1.25.0 (semver)1.25.0
1.25.0go get code.gitea.io/[email protected]Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0