# CVE-2024-1135: HTTP Request Smuggling in benoitc/gunicorn

> Attackers can exploit HTTP request smuggling in Gunicorn to bypass security restrictions, access restricted endpoints, and expose sensitive data.

- **Severity:** High 7.5 (`CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/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:** 16 Apr 2024
- **Updated:** 13 Feb 2025
- **Also known as:** CLSA-2026-1787306646, DEBIAN-CVE-2024-1135, DLA-3851-1, DLA-3996-1, ECHO-9a6c-5607-fd1b, GHSA-w3h3-4rj7-4ph4, MGASA-2024-0236, OESA-2026-3658, PYSEC-2026-1434, RHSA-2024:2727, RHSA-2024:4054, ROOT-APP-PYPI-CVE-2024-1135, SUSE-SU-2024:1440-1, SUSE-SU-2024:2881-1, UBUNTU-CVE-2024-1135, openSUSE-SU-2024:13891-1

## What is CVE-2024-1135?

CVE-2024-1135 is a high-severity vulnerability in benoitc/gunicorn, published on 16 Apr 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Gunicorn fails to properly validate Transfer-Encoding headers, leading to HTTP Request Smuggling (HRS) vulnerabilities. By crafting requests with conflicting Transfer-Encoding headers, attackers can bypass security restrictions and access restricted endpoints. This issue is due to Gunicorn's handling of Transfer-Encoding headers, where it incorrectly processes requests with multiple, conflicting Transfer-Encoding headers, treating them as chunked regardless of the final encoding specified. This vulnerability allows for a range of attacks including cache poisoning, session manipulation, and data exposure.

Weakness: CWE-444 (Inconsistent Interpretation of HTTP Requests)

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

3 open source packages ship an affected version, including gunicorn.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `gunicorn` | PyPI | All versions | 22.0.0 |
| `gunicorn` | PyPI | All versions | 22.0.0 |
| `gunicorn` | PyPI | All versions | 22.0.0 |
| `python-gunicorn` | Red Hat:openstack:16.2::el8 | All versions | 0:19.9.0-11.el8ost |
| `python3-gunicorn` | Red Hat:openstack:16.2::el8 | All versions | 0:19.9.0-11.el8ost |
| `python-gunicorn` | Red Hat:openstack:17.1::el9 | All versions | 0:20.0.4-7.el9ost |
| `python3-gunicorn` | Red Hat:openstack:17.1::el9 | All versions | 0:20.0.4-7.el9ost |
| `python-gunicorn` | SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS | All versions | 20.1.0-150400.12.6.1 |
| `python-gunicorn` | SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS | All versions | 20.1.0-150400.12.6.1 |
| `python-gunicorn` | SUSE:Linux Enterprise Module for Public Cloud 15 SP2 | All versions | 19.7.1-150000.3.7.1 |
| `python-gunicorn` | SUSE:Linux Enterprise Module for Public Cloud 15 SP3 | All versions | 19.7.1-150000.3.7.1 |
| `python-gunicorn` | SUSE:Linux Enterprise Module for Public Cloud 15 SP4 | All versions | 19.7.1-150000.3.7.1 |
| `python-gunicorn` | SUSE:Linux Enterprise Module for Public Cloud 15 SP5 | All versions | 19.7.1-150000.3.7.1 |
| `python-gunicorn` | SUSE:Linux Enterprise Module for Public Cloud 15 SP6 | All versions | 19.7.1-150000.3.7.1 |
| `python-gunicorn` | SUSE:Linux Enterprise Module for Python 3 15 SP5 | All versions | 20.1.0-150400.12.6.1 |
| `python-gunicorn` | SUSE:Linux Enterprise Server 15 SP4-LTSS | All versions | 20.1.0-150400.12.6.1 |
| `python-gunicorn` | SUSE:Linux Enterprise Server for SAP Applications 15 SP4 | All versions | 20.1.0-150400.12.6.1 |
| `python-gunicorn` | openSUSE:Leap 15.5 | All versions | 19.7.1-150000.3.7.1 |
| `python-gunicorn` | openSUSE:Leap 15.5 | All versions | 20.1.0-150400.12.6.1 |

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

Upgrade gunicorn to 22.0.0 or later.

## Is CVE-2024-1135 being exploited?

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

## Fix prompt for AI coding agents

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

What it is: CVE-2024-1135 is a high-severity vulnerability in benoitc/gunicorn, published on 16 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-1135 in the wild and no public exploit code.

Affected packages and fixed versions:
- gunicorn (PyPI): affected all versions; fixed in 22.0.0
- gunicorn (PyPI): affected all versions; fixed in 22.0.0
- gunicorn (PyPI): affected all versions; fixed in 22.0.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-1135/ (Markdown: https://insights.sbomify.com/CVE-2024-1135/index.md)
```

## Sources

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

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