# CVE-2024-34161: NGINX HTTP/3 QUIC vulnerability

> Attackers can leak previously freed memory from NGINX workers via crafted QUIC packets when HTTP/3 is enabled with large MTUs.

- **Severity:** Medium 5.3 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 29 May 2024
- **Updated:** 13 Feb 2025
- **Also known as:** BIT-nginx-2024-34161, BIT-nginx-gateway-2024-34161, DEBIAN-CVE-2024-34161

## What is CVE-2024-34161?

CVE-2024-34161 is a medium-severity use after free vulnerability in Fedoraproject Fedora, published on 29 May 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

When NGINX Plus or NGINX OSS are configured to use the HTTP/3 QUIC module and the network infrastructure supports a Maximum Transmission Unit (MTU) of 4096 or greater without fragmentation, undisclosed QUIC packets can cause NGINX worker processes to leak previously freed memory.

Weakness: CWE-416 (Use After Free)

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

2 open source packages ship an affected version, including nginx and nginx-gateway. It affects 3 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `nginx` | Bitnami | From 1.25.0 | 1.26.1 |
| `nginx-gateway` | Bitnami | From 1.25.0 | 1.26.1 |

Products: F5 Nginx Open Source, F5 Nginx Plus, Fedoraproject Fedora.

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

Upgrade nginx to 1.26.1 or later.

## Is CVE-2024-34161 being exploited?

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

## Other vulnerabilities in Fedoraproject Fedora

- [CVE-2026-27654](https://insights.sbomify.com/CVE-2026-27654/): NGINX ngx_http_dav_module vulnerability (high 8.8)
- [CVE-2026-27651](https://insights.sbomify.com/CVE-2026-27651/): NGINX ngx_mail_auth_http_module vulnerability (high 8.7)
- [CVE-2026-27784](https://insights.sbomify.com/CVE-2026-27784/): NGINX ngx_http_mp4_module vulnerability (high 8.5)
- [CVE-2026-32647](https://insights.sbomify.com/CVE-2026-32647/): NGINX ngx_http_mp4_module vulnerability (high 8.5)
- [CVE-2024-24989](https://insights.sbomify.com/CVE-2024-24989/): NGINX HTTP/3 QUIC vulnerability (high 7.5)

## Fix prompt for AI coding agents

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

What it is: CVE-2024-34161 is a medium-severity use after free vulnerability in Fedoraproject Fedora, published on 29 May 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-34161 in the wild and no public exploit code.

Affected packages and fixed versions:
- nginx (Bitnami): affected from 1.25.0; fixed in 1.26.1
- nginx-gateway (Bitnami): affected from 1.25.0; fixed in 1.26.1

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

## Sources

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

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