GHSA-xhjq-w7xm-p8qj CVE-2017-3204 GO-2020-0013
golang.org/x/crypto/ssh Man-in-the-Middle attack
- Severity
- 8.1 / 10
- High · CVSS 3.1
- Exploit chance (EPSS)
- 3.16%
- Chance of exploitation in the next 30 days. Higher than 87.97% of scored vulnerabilities.
- Known exploited
- No
- Not in CISA's catalog
- Weakness
- —
- Not classified
- Fix
0.0.0-20170330155735-e4e2799dd7aa- Upgrade golang.org/x/crypto to this version or later
Description
The Go SSH library (golang.org/x/crypto/ssh) by default does not verify host keys, facilitating man-in-the-middle attacks if ClientConfig.HostKeyCallback is not set. Default behavior changed in commit e4e2799 to require explicitly registering a hostkey verification mechanism.
Affected versions
Go
| Package | Vulnerable | Fixed in |
|---|---|---|
| golang.org/x/crypto | < 0.0.0-20170330155735-e4e2799dd7aa |
0.0.0-20170330155735-e4e2799dd7aa |
How to fix
Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.
golang.org/x/crypto Go → 0.0.0-20170330155735-e4e2799dd7aa
- go
go get golang.org/x/crypto@v0.0.0-20170330155735-e4e2799dd7aa && go mod tidy
Severity breakdown
CVSS 3.1 8.1
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
- Attack vector
- Network
- Attack complexity
- High
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- High
- Availability
- High
References
Advisories
Other links
- github.com/golang/go/issues/19767
- github.com/golang/crypto/commit/e4e2799dd7aab89f583e1d898300d96367750991
- bridge.grumpy-troll.org/2017/04/golang-ssh-security
- go.dev/cl/340830
- go.dev/cl/38701
- go.dev/issue/19767
- go.googlesource.com/crypto/+/e4e2799dd7aab89f583e1d898300d96367750991
- godoc.org/golang.org/x/crypto/ssh
- pkg.go.dev/vuln/GO-2020-0013
- web.archive.org/web/20170423080311/https://www.securityfocus.com/bid/97481
- web.nvd.nist.gov/view/vuln/detail
- bridge.grumpy-troll.org/2017/04/golang-ssh-security
Timeline
- Published
- Last updated by the source
- Latest EPSS score
Related advisories
| Advisory | Severity | Why it's related |
|---|---|---|
| GO-2026-6355 Prevent DoS on deadlocked established channel in golang.org/x/crypto/ssh | High | Also affects golang.org/x/crypto |
| GO-2026-6354 Prevent DoS on deadlocked undecided channel in golang.org/x/crypto/ssh | High | Also affects golang.org/x/crypto |
| GO-2026-6303 Source-address critical option not enforced for non-public-key auth callbacks in golang.org/x/crypto/ssh | High | Also affects golang.org/x/crypto |
| GO-2026-5932 The golang.org/x/crypto/openpgp package is unmaintained, unsafe by design, and has known security issues | Not rated yet | Also affects golang.org/x/crypto |
| GHSA-x527-x647-q7gg golang.org/x/crypto: Invoking VerifiedPublicKeyCallback permissions skip enforcement | Critical | Also affects golang.org/x/crypto |
| GHSA-w879-237q-wc7r golang.org/x/crypto: Invoking pathological RSA/DSA parameters may cause DoS | High | Also affects golang.org/x/crypto |
| GHSA-vgwf-h737-ff37 golang.org/x/crypto: Invoking client can cause server deadlock on unexpected responses | Critical | Also affects golang.org/x/crypto |
| GHSA-rm3j-f69w-wqmq golang.org/x/crypto vulnerable to infinite loop on large channel writes | Critical | Also affects golang.org/x/crypto |
Credits: Phil Pennock
MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.
Check your repos with MergeHarbor