CVE-2024-6827: Gunicorn Gunicorn HTTP Request/Response Smuggling Vulnerability Vulnerability

HIGH
Advisory Identifier: GHSA-hc5x-x2vx-497g
CVSS 7.5
CWE-444
Published
Advisory Summary

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

CVE-2024-6827 at a Glance

CVE Identifier CVE-2024-6827
GHSA Identifier GHSA-hc5x-x2vx-497g
Severity HIGH
CVSS v3.1 Base Score 7.5
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: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/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 High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2024-6827

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-6827, 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 version 21.2.0 does not properly validate the value of the 'Transfer-Encoding' header as specified in the RFC standards, which leads to the default fallback method of 'Content-Length,' making it vulnerable to TE.CL request smuggling. This vulnerability can lead to cache poisoning, data exposure, session manipulation, SSRF, XSS, DoS, data integrity compromise, security bypass, information leakage, and business logic abuse.

CVE-2024-6827 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-6827?
CVE-2024-6827 is a security vulnerability in Gunicorn involving Gunicorn HTTP Request/Response Smuggling vulnerability 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-6827?
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-6827?
CVE-2024-6827 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2024-6827?
CVE-2024-6827 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-6827?
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-hc5x-x2vx-497g",
  "modified" : "2025-09-29T21:13:31Z",
  "published" : "2025-03-20T12:32:45Z",
  "aliases" : [ "CVE-2024-6827" ],
  "summary" : "Gunicorn HTTP Request/Response Smuggling vulnerability",
  "details" : "Gunicorn version 21.2.0 does not properly validate the value of the 'Transfer-Encoding' header as specified in the RFC standards, which leads to the default fallback method of 'Content-Length,' making it vulnerable to TE.CL request smuggling. This vulnerability can lead to cache poisoning, data exposure, session manipulation, SSRF, XSS, DoS, data integrity compromise, security bypass, information leakage, and business logic abuse.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/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-6827"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/benoitc/gunicorn/issues/3087"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/benoitc/gunicorn/issues/3278"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/benoitc/gunicorn/pull/3113"
  }, {
    "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/1b4f8f38-39da-44b6-9f98-f618639d0dd7"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-444" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-03-21T23:56:30Z",
    "nvd_published_at" : "2025-03-20T10:15:33Z"
  }
}