CVE-2023-27522: UWSGI Apache HTTP Server Vulnerability

HIGH
Advisory Identifier: GHSA-vcph-37mh-fqrh
CVSS 7.5
CWE-444
Published
Advisory Summary

CVE-2023-27522 is a HIGH (CVSS 7.5) apache http server vulnerability (CWE-444: Inconsistent Interpretation of HTTP Requests ('HTTP Request/Response Smuggling')) affecting UWSGI libraries in the PyPI ecosystem. The issue involves apache http server via mod_proxy_uwsgi http response smuggling. Remediation is available by upgrading affected packages to version 2.0.22.

CVE-2023-27522 at a Glance

CVE Identifier CVE-2023-27522
GHSA Identifier GHSA-vcph-37mh-fqrh
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-444: Inconsistent Interpretation of HTTP Requests ('HTTP Request/Response Smuggling')
Affected Product UWSGI
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.1/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-2023-27522

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

uWSGI fixed: 2.0.22
pip install uWSGI>=2.0.22
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 uWSGI

How to Check if You Are Affected

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

pip show uWSGI

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

Note: The pip show uWSGI 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 UWSGI, 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

HTTP Response Smuggling vulnerability in Apache HTTP Server via mod_proxy_uwsgi. This issue affects Apache HTTP Server from 2.4.30 through 2.4.55 and the uWSGI PyPI package prior to version 2.0.22. Special characters in the origin response header can truncate/split the response forwarded to the client.

CVE-2023-27522 Affected UWSGI Versions

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

References

Frequently Asked Questions

What is CVE-2023-27522?
CVE-2023-27522 is a security vulnerability in UWSGI involving Apache HTTP Server via mod_proxy_uwsgi HTTP response smuggling under CWE-444: Inconsistent Interpretation of HTTP Requests ('HTTP Request/Response Smuggling').
Which UWSGI versions are affected?
Affected versions include releases prior to 2.0.22 across affected packages: uWSGI.
What version fixes CVE-2023-27522?
Upgrading to 2.0.22 (or the latest patched release for your respective branch) resolves the vulnerability.
Is uWSGI affected?
Yes, uWSGI is affected in releases prior to 2.0.22. Upgrade your dependency to 2.0.22 or later.
What is the CVSS score of CVE-2023-27522?
CVE-2023-27522 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N.
What CWE is associated with CVE-2023-27522?
CVE-2023-27522 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-2023-27522?
Run the dependency tree command: 'pip show uWSGI'. 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-vcph-37mh-fqrh",
  "modified" : "2023-08-24T20:07:48Z",
  "published" : "2023-03-07T18:30:39Z",
  "aliases" : [ "CVE-2023-27522" ],
  "summary" : "Apache HTTP Server via mod_proxy_uwsgi HTTP response smuggling",
  "details" : "HTTP Response Smuggling vulnerability in Apache HTTP Server via mod_proxy_uwsgi. This issue affects Apache HTTP Server from 2.4.30 through 2.4.55 and the uWSGI PyPI package prior to version 2.0.22. Special characters in the origin response header can truncate/split the response forwarded to the client.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "uWSGI"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.0.22"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-27522"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/httpd/commit/d753ea76b5972a85349b68c31b59d04c60014f2d"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/unbit/uwsgi/commit/58ee1df31fa9e9af106aaeabb82374c36b433822"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/unbit/uwsgi/commit/acb03530aaaeaa810f28a5b64da619525940f569"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/unbit/uwsgi"
  }, {
    "type" : "WEB",
    "url" : "https://httpd.apache.org/security/vulnerabilities_24.html"
  }, {
    "type" : "WEB",
    "url" : "https://lists.debian.org/debian-lts-announce/2023/04/msg00028.html"
  }, {
    "type" : "WEB",
    "url" : "https://security.gentoo.org/glsa/202309-01"
  }, {
    "type" : "WEB",
    "url" : "https://uwsgi-docs.readthedocs.io/en/latest/Changelog-2.0.22.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-444" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-08-24T20:07:48Z",
    "nvd_published_at" : "2023-03-07T16:15:00Z"
  }
}