Vulnerabilities in pkg:pypi/gunicorn

PACKAGE
Advisory Identifier: GHSA-32pc-xphx-q4f6
Advisory Summary

CVE-2018-1000164 is a HIGH (CVSS 7.5) gunicorn contains improper neutralization of vulnerability (CWE-93: Improper Neutralization of CRLF Sequences ('CRLF Injection')) affecting Gunicorn libraries in the PyPI ecosystem. The issue involves gunicorn contains improper neutralization of crlf sequences in http headers. Remediation is available by upgrading affected packages to version 19.5.0.

3 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:pypi/gunicorn

3 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:pypi/gunicorn. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-32pc-xphx-q4f6 CVE-2018-1000164 HIGH Gunicorn contains Improper Neutralization of CRLF sequences in HTTP headers
GHSA-hc5x-x2vx-497g CVE-2024-6827 HIGH Gunicorn HTTP Request/Response Smuggling vulnerability
GHSA-w3h3-4rj7-4ph4 CVE-2024-1135 HIGH Request smuggling leading to endpoint restriction bypass in Gunicorn

CVE-2018-1000164 at a Glance

CVE Identifier CVE-2018-1000164
GHSA Identifier GHSA-32pc-xphx-q4f6
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-93: Improper Neutralization of CRLF Sequences ('CRLF Injection')
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:N/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 None (C:N)
Integrity High (I:H)
Availability None (A:N)

How to Fix CVE-2018-1000164

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: 19.5.0
pip install gunicorn>=19.5.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-2018-1000164, 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 19.5.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-93: Improper Neutralization of CRLF Sequences ('CRLF Injection'), where the product uses crlf (carriage return line feeds) as a special element, e.g. to separate lines or records, but it does not neutralize or incorrectly neutralizes crlf sequences from inputs. 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 19.4.5 contains a CWE-113: Improper Neutralization of CRLF Sequences in HTTP Headers vulnerability in "process_headers" function in "gunicorn/http/wsgi.py" that can result in an attacker causing the server to return arbitrary HTTP headers. This vulnerability appears to have been fixed in 19.5.0.

CVE-2018-1000164 Affected Gunicorn Versions

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

References

Frequently Asked Questions

What is CVE-2018-1000164?
CVE-2018-1000164 is a security vulnerability in Gunicorn involving Gunicorn contains Improper Neutralization of CRLF sequences in HTTP headers under CWE-93: Improper Neutralization of CRLF Sequences ('CRLF Injection').
Which Gunicorn versions are affected?
Affected versions include releases prior to 19.5.0 across affected packages: gunicorn.
What version fixes CVE-2018-1000164?
Upgrading to 19.5.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is gunicorn affected?
Yes, gunicorn is affected in releases prior to 19.5.0. Upgrade your dependency to 19.5.0 or later.
What is the CVSS score of CVE-2018-1000164?
CVE-2018-1000164 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:N/I:H/A:N.
What CWE is associated with CVE-2018-1000164?
CVE-2018-1000164 is classified under CWE-93: Improper Neutralization of CRLF Sequences ('CRLF Injection') (The product uses CRLF (carriage return line feeds) as a special element, e.g. to separate lines or records, but it does not neutralize or incorrectly neutralizes CRLF sequences from inputs.).
How can I check PyPI dependencies for CVE-2018-1000164?
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-32pc-xphx-q4f6",
  "modified" : "2026-09-08T15:38:28Z",
  "published" : "2018-07-12T20:30:49Z",
  "aliases" : [ "CVE-2018-1000164" ],
  "summary" : "Gunicorn contains Improper Neutralization of CRLF sequences in HTTP headers",
  "details" : "gunicorn version 19.4.5 contains a CWE-113: Improper Neutralization of CRLF Sequences in HTTP Headers vulnerability in \"process_headers\" function in \"gunicorn/http/wsgi.py\" that can result in an attacker causing the server to return arbitrary HTTP headers. This vulnerability appears to have been fixed in 19.5.0.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "gunicorn"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "19.5.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2018-1000164"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/benoitc/gunicorn/issues/1227"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/benoitc/gunicorn/commit/1e10a02e73c87dfadc394b361af33864d0e59e24"
  }, {
    "type" : "WEB",
    "url" : "https://epadillas.github.io/2018/04/02/http-header-splitting-in-gunicorn-19.4.5"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/benoitc/gunicorn"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/gunicorn/PYSEC-2018-55.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://lists.debian.org/debian-lts-announce/2018/04/msg00022.html"
  }, {
    "type" : "WEB",
    "url" : "https://usn.ubuntu.com/4022-1"
  }, {
    "type" : "WEB",
    "url" : "https://www.debian.org/security/2018/dsa-4186"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-93" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-06-16T20:53:40Z",
    "nvd_published_at" : null
  }
}