CVE-2024-1135: Gunicorn Request Smuggling Leading To Endpoint Vulnerability

HIGH
Advisory Identifier: GHSA-w3h3-4rj7-4ph4
CVSS 8.2
CWE-444
Published
Advisory Summary

CVE-2024-1135 is a HIGH (CVSS 8.2) request smuggling leading to endpoint vulnerability (CWE-444: Inconsistent Interpretation of HTTP Requests ('HTTP Request/Response Smuggling')) affecting Gunicorn libraries in the PyPI ecosystem. The issue involves request smuggling leading to endpoint restriction bypass in gunicorn. Remediation is available by upgrading affected packages to version 22.0.0.

CVE-2024-1135 at a Glance

CVE Identifier CVE-2024-1135
GHSA Identifier GHSA-w3h3-4rj7-4ph4
Severity HIGH
CVSS v3.1 Base Score 8.2
CWE Classification CWE-444: Inconsistent Interpretation of HTTP Requests ('HTTP Request/Response Smuggling')
Affected Product Gunicorn
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 8.2

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2024-1135

To remediate this vulnerability, upgrade all affected Gunicorn dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

gunicorn fixed: 22.0.0
pip install gunicorn>=22.0.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show gunicorn

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2024-1135, inspect your installed packages using pip:

pip show gunicorn

Analyze the terminal output to locate any version of Gunicorn in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 22.0.0), your application is affected.

Note: The pip show gunicorn command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-444: Inconsistent Interpretation of HTTP Requests ('HTTP Request/Response Smuggling'), where the product acts as an intermediary http agent (such as a proxy or firewall) in the data flow between two entities such as a client and server, but it does not interpret malformed http requests or responses in ways that are consistent with how the messages will be processed by those entities that are at the ultimate destination. In Gunicorn, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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 has been shown to allow access to endpoints restricted by gunicorn. This issue has been addressed in version 22.0.0. To be affected users must have a network path which does not filter out invalid requests. These users are advised to block access to restricted endpoints via a firewall or other mechanism if they are unable to update.

CVE-2024-1135 Affected Gunicorn Versions

1 component(s)
Fixed Versions:
22.0.0
Product / Package Ecosystem Affected Versions Fixed Version
gunicorn
PyPI
< 22.0.0
22.0.0

References

Frequently Asked Questions

What is CVE-2024-1135?
CVE-2024-1135 is a security vulnerability in Gunicorn involving Request smuggling leading to endpoint restriction bypass in Gunicorn under CWE-444: Inconsistent Interpretation of HTTP Requests ('HTTP Request/Response Smuggling').
Which Gunicorn versions are affected?
Affected versions include releases prior to 22.0.0 across affected packages: gunicorn.
What version fixes CVE-2024-1135?
Upgrading to 22.0.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is gunicorn affected?
Yes, gunicorn is affected in releases prior to 22.0.0. Upgrade your dependency to 22.0.0 or later.
What is the CVSS score of CVE-2024-1135?
CVE-2024-1135 has a CVSS v3.1 base score of 8.2 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:N.
What CWE is associated with CVE-2024-1135?
CVE-2024-1135 is classified under CWE-444: Inconsistent Interpretation of HTTP Requests ('HTTP Request/Response Smuggling') (The product acts as an intermediary HTTP agent (such as a proxy or firewall) in the data flow between two entities such as a client and server, but it does not interpret malformed HTTP requests or responses in ways that are consistent with how the messages will be processed by those entities that are at the ultimate destination.).
How can I check PyPI dependencies for CVE-2024-1135?
Run the dependency tree command: 'pip show gunicorn'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-w3h3-4rj7-4ph4",
  "modified" : "2025-09-29T21:13:05Z",
  "published" : "2024-04-16T00:30:32Z",
  "aliases" : [ "CVE-2024-1135" ],
  "summary" : "Request smuggling leading to endpoint restriction bypass in Gunicorn",
  "details" : "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 has been shown to allow access to endpoints restricted by gunicorn. This issue has been addressed in version 22.0.0.\n\nTo be affected users must have a network path which does not filter out invalid requests. These users are advised to block access to restricted endpoints via a firewall or other mechanism if they are unable to update.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "gunicorn"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "22.0.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-1135"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/benoitc/gunicorn/issues/3091"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/benoitc/gunicorn/pull/3113"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/benoitc/gunicorn/commit/ac29c9b0a758d21f1e0fb3b3457239e523fa9f1d"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/benoitc/gunicorn"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/benoitc/gunicorn/releases/tag/22.0.0"
  }, {
    "type" : "WEB",
    "url" : "https://huntr.com/bounties/22158e34-cfd5-41ad-97e0-a780773d96c1"
  }, {
    "type" : "WEB",
    "url" : "https://lists.debian.org/debian-lts-announce/2024/06/msg00027.html"
  }, {
    "type" : "WEB",
    "url" : "https://lists.debian.org/debian-lts-announce/2024/12/msg00018.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-444" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-04-16T02:54:35Z",
    "nvd_published_at" : "2024-04-16T00:15:07Z"
  }
}