# CVE-2020-29652: golang.org/x/crypto/ssh NULL Pointer Dereference vulnerability

> Remote attackers can cause a denial of service against SSH servers using the Go SSH library due to a nil pointer dereference.

- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 17 Dec 2020
- **Updated:** 4 Aug 2024
- **Also known as:** CLEANSTART-2026-RN21890, CLEANSTART-2026-VL48294, DEBIAN-CVE-2020-29652, GHSA-3vm4-22fp-5rfm, GO-2021-0227, UBUNTU-CVE-2020-29652, openSUSE-SU-2024:11667-1

## What is CVE-2020-29652?

CVE-2020-29652 is a high-severity vulnerability in n/a, published on 17 Dec 2020. An attacker can exploit it over the internet without logging in, with no action from the victim.

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

Weakness: CWE-476 (NULL Pointer Dereference)

## Which versions are affected by CVE-2020-29652?

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


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `golang.org/x/crypto` | Go | All versions | 0.0.0-20201216223049-8b5274cf687f |
| `golang.org/x/crypto` | Go | All versions | 0.0.0-20201216223049-8b5274cf687f |
| `golang.org/x/crypto` | Go | All versions | 0.0.0-20201216223049-8b5274cf687f |
| `velero` | openSUSE:Tumbleweed | All versions | 1.7.1-1.1 |

Products: Golang Ssh.

## How do I fix CVE-2020-29652?

Upgrade golang.org/x/crypto to 0.0.0-20201216223049-8b5274cf687f or later.

## Is CVE-2020-29652 being exploited?

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

## Other vulnerabilities in n/a

- [CVE-2021-43565](https://insights.sbomify.com/CVE-2021-43565/): x/crypto/ssh vulnerable to panic via malformed packets (high 7.5)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2020-29652 and fix it if it is affected.

What it is: CVE-2020-29652 is a high-severity vulnerability in n/a, published on 17 Dec 2020. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2020-29652 in the wild and no public exploit code.

Affected packages and fixed versions:
- golang.org/x/crypto (Go): affected all versions; fixed in 0.0.0-20201216223049-8b5274cf687f
- golang.org/x/crypto (Go): affected all versions; fixed in 0.0.0-20201216223049-8b5274cf687f
- golang.org/x/crypto (Go): affected all versions; fixed in 0.0.0-20201216223049-8b5274cf687f

Task:
1. 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.
2. 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.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2020-29652/ (Markdown: https://insights.sbomify.com/CVE-2020-29652/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2020-29652
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2020-29652
- OSV: https://osv.dev/vulnerability/CVE-2020-29652

---
From sbomify Insights: https://insights.sbomify.com/CVE-2020-29652/
Summaries are generated and may contain mistakes; the official description above is the record.
