CVE-2020-29652 — x/crypto
HIGHCVE-2020-29652 is a high-severity (CVSS 7.5) NULL Pointer Dereference vulnerability in golang.org/x/crypto. A fix is available for golang.org/x/crypto — see the affected versions and patch details below.
golang.org/x/crypto/ssh NULL Pointer Dereference vulnerability
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
golang.org/x/cryptoReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.
Description
A nil pointer dereference in the golang.org/x/crypto/ssh component through v0.0.0-20201203163018-be400aefbc4c for Go allows remote attackers to cause a denial of service against SSH servers. An attacker can craft an authentication request message for the gssapi-with-mic method which will cause NewServerConn to panic via a nil pointer dereference if ServerConfig.GSSAPIWithMICConfig is nil.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐹Go | golang.org/x/crypto | all versions | 0.0.0-20201216223049-8b5274cf687fgo get golang.org/x/crypto@v0.0.0-20201216223049-8b5274cf687f |
Affected Products
sshgolangDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for golang.org/x/crypto, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update golang.org/x/crypto to 0.0.0-20201216223049-8b5274cf687f or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2020-29652 is resolved across your whole dependency graph.
Workarounds
Cap what an attacker can consume: apply request size, rate and timeout limits in front of the affected component, and run it with memory and CPU limits so exhaustion degrades one worker rather than the whole service.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
A large number of products include the affected package, but do not make use of the vulnerable SSH server code. Accordingly, the flaw itself is rated as "Important", but these products themselves all have a "Low" severity rating. Additionally, a number of products include golang.org/x/crypto (or even…
| Product | Fixed in | Advisory |
|---|---|---|
| Red Hat Enterprise Linux 8 | container-tools:rhel8-8040020210407081426.59631bd5 | RHSA-2021:1796 |
| Red Hat OpenShift Container Platform 4.7 | openshift4/ose-aws-ebs-csi-driver-rhel8:v4.7.0-202102130115.p0 | RHSA-2020:5633 |
| RHEL-8-CNV-4.8 | container-native-virtualization/vm-import-operator-rhel8:v4.8.0-18 | RHSA-2021:2920 |
Frequently Asked Questions
Is CVE-2020-29652 in your dependencies?
Find it across Go, including transitive dependencies.