# CVE-2024-22189: QUIC's Connection ID Mechanism vulnerable to Memory Exhaustion Attack

> An attacker can exhaust memory in quic-go by sending excessive connection ID frames, causing a denial of service.

- **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:** 4 Apr 2024
- **Updated:** 23 Aug 2024
- **Also known as:** AZL-39749, AZL-39851, DEBIAN-CVE-2024-22189, GHSA-c33x-xqrf-c478, GO-2024-2682, UBUNTU-CVE-2024-22189, openSUSE-SU-2024:13845-1, openSUSE-SU-2024:13847-1, openSUSE-SU-2024:13849-1, openSUSE-SU-2024:13865-1, openSUSE-SU-2024:14014-1

## What is CVE-2024-22189?

CVE-2024-22189 is a high-severity denial of service vulnerability in quic-go, published on 4 Apr 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

quic-go is an implementation of the QUIC protocol in Go. Prior to version 0.42.0, an attacker can cause its peer to run out of memory sending a large number of `NEW_CONNECTION_ID` frames that retire old connection IDs. The receiver is supposed to respond to each retirement frame with a `RETIRE_CONNECTION_ID` frame. The attacker can prevent the receiver from sending out (the vast majority of) these `RETIRE_CONNECTION_ID` frames by collapsing the peers congestion window (by selectively acknowledging received packets) and by manipulating the peer's RTT estimate. Version 0.42.0 contains a patch for the issue. No known workarounds are available.

Weakness: CWE-770 (Allocation of Resources Without Limits or Throttling)

## Which versions are affected by CVE-2024-22189?

3 open source packages ship an affected version, including github.com/quic-go/quic-go.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/quic-go/quic-go` | Go | All versions | 0.42.0 |
| `github.com/quic-go/quic-go` | Go | All versions | 0.42.0 |
| `github.com/quic-go/quic-go` | Go | All versions | 0.42.0 |
| `caddy` | openSUSE:Tumbleweed | All versions | 2.8.4-1.1 |
| `coredns` | openSUSE:Tumbleweed | All versions | 1.11.1-5.1 |
| `kubo` | openSUSE:Tumbleweed | All versions | 0.27.0-2.1 |
| `syncthing` | openSUSE:Tumbleweed | All versions | 1.27.6-1.1 |

## How do I fix CVE-2024-22189?

Upgrade github.com/quic-go/quic-go to 0.42.0 or later.

## Is CVE-2024-22189 being exploited?

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

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2024-22189 and fix it if it is affected.

What it is: CVE-2024-22189 is a high-severity denial of service vulnerability in quic-go, published on 4 Apr 2024. 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-2024-22189 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/quic-go/quic-go (Go): affected all versions; fixed in 0.42.0
- github.com/quic-go/quic-go (Go): affected all versions; fixed in 0.42.0
- github.com/quic-go/quic-go (Go): affected all versions; fixed in 0.42.0

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

## Sources

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

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