# CVE-2023-29409: Large RSA keys can cause high CPU usage in crypto/tls

> Attackers can cause high CPU usage and denial of service in Go applications by presenting extremely large RSA keys in certificate chains.

- **Severity:** Medium 5.3 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 2 Aug 2023
- **Updated:** 13 Feb 2025
- **Also known as:** AZL-27812, AZL-27814, AZL-37302, AZL-37344, AZL-52881, AZL-79008, AZL-98862, BIT-golang-2023-29409, DEBIAN-CVE-2023-29409, GHSA-xc82-5m89-g4jv, GO-2023-1987, MINI-jj2h-w9wx-972f, OESA-2023-1530, OESA-2023-1531, OESA-2023-1532, OESA-2023-1533, OESA-2023-1591, RHSA-2024:0292, SUSE-SU-2023:3181-1, SUSE-SU-2023:3263-1, SUSE-SU-2023:3474-1, SUSE-SU-2023:3861-1, SUSE-SU-2023:3886-1, SUSE-SU-2023:3888-1, UBUNTU-CVE-2023-29409, openSUSE-SU-2024:13093-1, openSUSE-SU-2024:13094-1

## What is CVE-2023-29409?

CVE-2023-29409 is a medium-severity denial of service vulnerability in Golang Go, published on 2 Aug 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Extremely large RSA keys in certificate chains can cause a client/server to expend significant CPU time verifying signatures. With fix, the size of RSA keys transmitted during handshakes is restricted to <= 8192 bits. Based on a survey of publicly trusted RSA keys, there are currently only three certificates in circulation with keys larger than this, and all three appear to be test certificates that are not actively deployed. It is possible there are larger keys in use in private PKIs, but we target the web PKI, so causing breakage here in the interests of increasing the default safety of users of crypto/tls seems reasonable.

Weakness: CWE-400 (Uncontrolled Resource Consumption)

## Which versions are affected by CVE-2023-29409?

2 open source packages ship an affected version, including golang and stdlib. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `golang` | Bitnami | All versions | 1.19.12, 1.20.7 |
| `stdlib` | Go | All versions | 1.19.12, 1.20.7, 1.21.0-rc.4 |
| `microshift` | Red Hat:openshift:4.14::el9 | All versions | 0:4.14.10-202401181720.p0.gd25a4c5.assembly.4.14.10.el9 |
| `microshift-greenboot` | Red Hat:openshift:4.14::el9 | All versions | 0:4.14.10-202401181720.p0.gd25a4c5.assembly.4.14.10.el9 |
| `microshift-networking` | Red Hat:openshift:4.14::el9 | All versions | 0:4.14.10-202401181720.p0.gd25a4c5.assembly.4.14.10.el9 |
| `microshift-release-info` | Red Hat:openshift:4.14::el9 | All versions | 0:4.14.10-202401181720.p0.gd25a4c5.assembly.4.14.10.el9 |
| `microshift-selinux` | Red Hat:openshift:4.14::el9 | All versions | 0:4.14.10-202401181720.p0.gd25a4c5.assembly.4.14.10.el9 |
| `go1.19` | SUSE:Enterprise Storage 7.1 | All versions | 1.19.12-150000.1.40.1 |
| `golang-github-prometheus-node_exporter` | SUSE:Enterprise Storage 7.1 | All versions | 1.5.0-150100.3.26.2 |
| `golang-github-prometheus-node_exporter` | SUSE:Linux Enterprise High Performance Computing 15 SP1-LTSS | All versions | 1.5.0-150100.3.26.2 |
| `golang-github-prometheus-node_exporter` | SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS | All versions | 1.5.0-150100.3.26.2 |
| `go1.19` | SUSE:Linux Enterprise High Performance Computing 15 SP3-ESPOS | All versions | 1.19.12-150000.1.40.1 |
| `golang-github-prometheus-node_exporter` | SUSE:Linux Enterprise High Performance Computing 15 SP3-ESPOS | All versions | 1.5.0-150100.3.26.2 |
| `go1.19` | SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | All versions | 1.19.12-150000.1.40.1 |
| `golang-github-prometheus-node_exporter` | SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | All versions | 1.5.0-150100.3.26.2 |
| `golang-github-prometheus-node_exporter` | SUSE:Linux Enterprise Module for Basesystem 15 SP4 | All versions | 1.5.0-150100.3.26.2 |
| `golang-github-prometheus-node_exporter` | SUSE:Linux Enterprise Module for Basesystem 15 SP5 | All versions | 1.5.0-150100.3.26.2 |
| `go1.19` | SUSE:Linux Enterprise Module for Development Tools 15 SP4 | All versions | 1.19.12-150000.1.40.1 |
| `go1.20` | SUSE:Linux Enterprise Module for Development Tools 15 SP4 | All versions | 1.20.7-150000.1.20.1 |
| `go1.19` | SUSE:Linux Enterprise Module for Development Tools 15 SP5 | All versions | 1.19.12-150000.1.40.1 |
| `go1.20` | SUSE:Linux Enterprise Module for Development Tools 15 SP5 | All versions | 1.20.7-150000.1.20.1 |
| `grafana` | SUSE:Linux Enterprise Module for Package Hub 15 SP4 | All versions | 9.5.5-150200.3.47.1 |
| `golang-github-prometheus-alertmanager` | SUSE:Linux Enterprise Module for Package Hub 15 SP5 | All versions | 0.23.0-150100.4.16.2 |
| `grafana` | SUSE:Linux Enterprise Module for Package Hub 15 SP5 | All versions | 9.5.5-150200.3.47.1 |
| `golang-github-prometheus-node_exporter` | SUSE:Linux Enterprise Server 15 SP1-LTSS | All versions | 1.5.0-150100.3.26.2 |
| `golang-github-prometheus-node_exporter` | SUSE:Linux Enterprise Server 15 SP2-LTSS | All versions | 1.5.0-150100.3.26.2 |
| `go1.19` | SUSE:Linux Enterprise Server 15 SP3-LTSS | All versions | 1.19.12-150000.1.40.1 |
| `golang-github-prometheus-node_exporter` | SUSE:Linux Enterprise Server 15 SP3-LTSS | All versions | 1.5.0-150100.3.26.2 |
| `golang-github-prometheus-node_exporter` | SUSE:Linux Enterprise Server for SAP Applications 15 SP1 | All versions | 1.5.0-150100.3.26.2 |
| `golang-github-prometheus-node_exporter` | SUSE:Linux Enterprise Server for SAP Applications 15 SP2 | All versions | 1.5.0-150100.3.26.2 |
| `go1.19` | SUSE:Linux Enterprise Server for SAP Applications 15 SP3 | All versions | 1.19.12-150000.1.40.1 |
| `golang-github-prometheus-node_exporter` | SUSE:Linux Enterprise Server for SAP Applications 15 SP3 | All versions | 1.5.0-150100.3.26.2 |
| `golang-github-prometheus-alertmanager` | SUSE:Manager Client Tools 15 | All versions | 0.23.0-150100.4.16.2 |
| `golang-github-prometheus-node_exporter` | SUSE:Manager Client Tools for SLE Micro 5 | All versions | 1.5.0-150100.3.26.2 |
| `golang-github-prometheus-node_exporter` | SUSE:Manager Proxy 4.2 | All versions | 1.5.0-150100.3.26.2 |
| `golang-github-prometheus-alertmanager` | SUSE:Manager Proxy Module 4.2 | All versions | 0.23.0-150100.4.16.2 |
| `spacecmd` | SUSE:Manager Proxy Module 4.2 | All versions | 4.2.24-150300.4.42.3 |
| `spacewalk-backend` | SUSE:Manager Proxy Module 4.2 | All versions | 4.2.29-150300.4.44.5 |
| `spacewalk-web` | SUSE:Manager Proxy Module 4.2 | All versions | 4.2.36-150300.3.47.5 |
| `golang-github-prometheus-alertmanager` | SUSE:Manager Proxy Module 4.3 | All versions | 0.23.0-150100.4.16.2 |

Products: Golang Go.

## How do I fix CVE-2023-29409?

Upgrade golang to a fixed version for your release line: 1.19.12 or 1.20.7.

## Is CVE-2023-29409 being exploited?

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

Public exploit code:

-  CVE-2023-29409 reproducer (github_poc): https://github.com/mateusz834/CVE-2023-29409

## Other vulnerabilities in Golang Go

- [CVE-2020-0601](https://insights.sbomify.com/CVE-2020-0601/): Microsoft Windows CryptoAPI Spoofing (high 8.1, exploited in the wild)
- [CVE-2026-27143](https://insights.sbomify.com/CVE-2026-27143/): Missing bound checks can lead to memory corruption in safe Go in cmd/compile (critical 9.8)
- [CVE-2024-24790](https://insights.sbomify.com/CVE-2024-24790/): Unexpected behavior from Is methods for IPv4-mapped IPv6 addresses in net/netip (critical 9.8)
- [CVE-2023-39320](https://insights.sbomify.com/CVE-2023-39320/): Arbitrary code execution via go.mod toolchain directive in cmd/go (critical 9.8)
- [CVE-2023-24540](https://insights.sbomify.com/CVE-2023-24540/): Improper handling of JavaScript whitespace in html/template (critical 9.8)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2023-29409 and fix it if it is affected.

What it is: CVE-2023-29409 is a medium-severity denial of service vulnerability in Golang Go, published on 2 Aug 2023. 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-2023-29409 in the wild and no public exploit code.

Affected packages and fixed versions:
- golang (Bitnami): affected all versions; fixed in 1.19.12, 1.20.7
- stdlib (Go): affected all versions; fixed in 1.19.12, 1.20.7, 1.21.0-rc.4

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-2023-29409/ (Markdown: https://insights.sbomify.com/CVE-2023-29409/index.md)
```

## Sources

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

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