{"answers":{"affected":"3 open source packages ship an affected version, including code.gitea.io/gitea.","exploited":"There is no known exploitation of GHSA-3m6q-h5gj-7mrw in the wild and no public exploit code.","fix":"Upgrade code.gitea.io/gitea to 1.25.0 or later.","what":"GHSA-3m6q-h5gj-7mrw is a vulnerability in code.gitea.io/gitea, published on 22 Apr 2026. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for GHSA-3m6q-h5gj-7mrw and fix it if it is affected.\n\nWhat it is: GHSA-3m6q-h5gj-7mrw is a vulnerability in code.gitea.io/gitea, published on 22 Apr 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of GHSA-3m6q-h5gj-7mrw in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- code.gitea.io/gitea (Go): affected all versions; fixed in 1.25.0\n- code.gitea.io/gitea (Go): affected all versions; fixed in 1.25.0\n- code.gitea.io/gitea (Go): affected all versions; fixed in 1.25.0\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/GHSA-3m6q-h5gj-7mrw/ (Markdown: https://insights.sbomify.com/GHSA-3m6q-h5gj-7mrw/index.md)","id":"GHSA-3m6q-h5gj-7mrw","markdown":"https://insights.sbomify.com/GHSA-3m6q-h5gj-7mrw/index.md","name":"GHSA-3m6q-h5gj-7mrw","record":{"aliases":["GO-2026-5091"],"analysis":{"component_type":"server_software","fix_type":"patch","impacts":["security_bypass"],"network_reachable":"yes","non_default_config":false,"product_category":"Gitea Git server","requires_auth":"none","summary":"Gitea's built-in SSH server advertises weak cryptographic algorithms by default, potentially allowing downgrade attacks or interception of SSH traffic.","user_interaction":"not_required","vuln_class":"weak_cryptography"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"## Summary\n\nThe 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.\n\n## Details\n\nRunning `ssh-audit` against a default deployment flags the following as `fail`:\n\n- **Key exchange**\n  - `ecdh-sha2-nistp256`\n  - `ecdh-sha2-nistp384`\n  - `ecdh-sha2-nistp521`\n- **MAC**\n  - `hmac-sha1`\n- **Host key**\n  - `ssh-rsa`\n\n## Reproduction\n\n```sh\ndocker run -it --rm positronsecurity/ssh-audit -p 2222 gitea.local\n```\n\n## Impact\n\nDefault 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.\n\n### Workaround\n\n```ini\n[server]\nSSH_SERVER_KEY_EXCHANGES = curve25519-sha256, diffie-hellman-group14-sha256\nSSH_SERVER_CIPHERS       = chacha20-poly1305@openssh.com, aes128-ctr, aes192-ctr, aes256-ctr, aes128-gcm@openssh.com, aes256-gcm@openssh.com\nSSH_SERVER_MACS          = hmac-sha2-256-etm@openssh.com, hmac-sha2-256\n```\n\nThere is no exposed option to restrict host key algorithms, so `ssh-rsa` remains advertised.\n\n## Acceptance criteria\n\n- [ ] Default `SSH_SERVER_KEY_EXCHANGES`, `SSH_SERVER_CIPHERS`, and `SSH_SERVER_MACS` updated to the secure list above.\n- [ ] New `SSH_SERVER_HOST_KEY_ALGORITHMS` option added, with a default that excludes `ssh-rsa`.\n- [ ] Documentation updated to reflect the new defaults.\n- [ ] `ssh-audit` against a fresh install reports no `[fail]` entries.","ecosystems":["Go"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"Gitea has insecure default SSH settings","id":"GHSA-3m6q-h5gj-7mrw","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"Go","product":null,"products":[],"type":"weak_cryptography","year":"2026"},"n_packages":3,"n_references":null,"packages":[{"ecosystem":"Go","fixed":["1.25.0"],"introduced":["0"],"last_affected":[],"package":"code.gitea.io/gitea","purl":null,"source":"GHSA-3m6q-h5gj-7mrw"},{"ecosystem":"Go","fixed":["1.25.0"],"introduced":["0"],"last_affected":[],"package":"code.gitea.io/gitea","purl":"pkg:golang/code.gitea.io/gitea","source":"GHSA-3m6q-h5gj-7mrw"},{"ecosystem":"Go","fixed":["1.25.0"],"introduced":["0"],"last_affected":[],"package":"code.gitea.io/gitea","purl":"pkg:golang/code.gitea.io/gitea","source":"GO-2026-5091"}],"products":null,"published":"2026-04-22","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"Go Vulnerability Database","prefix":"GO"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"Gitea's built-in SSH server advertises weak cryptographic algorithms by default, potentially allowing downgrade attacks or interception of SSH traffic.","url":"https://insights.sbomify.com/GHSA-3m6q-h5gj-7mrw/"}