CVE-2017-3204 golang.org/x/crypto/ssh Man-in-the-Middle attack

High 8.1 Published Updated

The Go SSH library failed to verify host keys by default, allowing man-in-the-middle attacks unless developers explicitly configured verification.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2017-3204?

CVE-2017-3204 is a high-severity vulnerability in Go SSH library, published on 4 Apr 2017. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official 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.

Weakness: CWE-310

Which versions are affected by CVE-2017-3204?

3 open source packages ship an affected version, including golang.org/x/crypto. It affects 1 product.

PackageAffectedFixed in
golang.org/x/crypto GoAll versions0.0.0-20170330155735-e4e2799dd7aa
golang.org/x/crypto GoAll versions0.0.0-20170330155735-e4e2799dd7aa
golang.org/x/crypto GoAll versions0.0.0-20170330155735-e4e2799dd7aa

Products include Golang Crypto.

How do I fix CVE-2017-3204?

Upgrade golang.org/x/crypto to 0.0.0-20170330155735-e4e2799dd7aa or later.

Is CVE-2017-3204 being exploited?

There is no known exploitation of CVE-2017-3204 in the wild and no public exploit code.

Sources

Also known as DEBIAN-CVE-2017-3204, GHSA-xhjq-w7xm-p8qj, GO-2020-0013, UBUNTU-CVE-2017-3204.

Is CVE-2017-3204 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free