CVE-2023-25578: Starlite Denial of Service Vulnerability

HIGH
Advisory Identifier: GHSA-p24m-863f-fm6q
CVSS 7.5
CWE-400 CWE-770
Published
Advisory Summary

CVE-2023-25578 is a HIGH (CVSS 7.5) denial of service vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Starlite libraries in the PyPI ecosystem. The issue involves denial of service vulnerability when parsing multipart request body. Remediation is available by upgrading affected packages to version 1.51.2.

CVE-2023-25578 at a Glance

CVE Identifier CVE-2023-25578
GHSA Identifier GHSA-p24m-863f-fm6q
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-400: Uncontrolled Resource Consumption
Affected Product Starlite
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:N/A:H).

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 None (I:N)
Availability High (A:H)

How to Fix CVE-2023-25578

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

starlite fixed: 1.51.2
pip install starlite>=1.51.2
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 starlite

How to Check if You Are Affected

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

pip show starlite

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

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

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In Starlite, 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

### Summary The request body parsing in `starlite` allows a potentially unauthenticated attacker to consume a large amount of CPU time and RAM. ### Details The multipart body parser processes an unlimited number of file parts. The multipart body parser processes an unlimited number of field parts. ### Impact This is a remote, potentially unauthenticated Denial of Service vulnerability. This vulnerability affects applications with a request handler that accepts a `Body(media_type=RequestEncodingType.MULTI_PART)`. The large amount of CPU time required for processing requests can block all available worker processes and significantly delay or slow down the processing of legitimate user requests. The large amount of RAM accumulated while processing requests can lead to Out-Of-Memory kills. Complete DoS is achievable by sending many concurrent multipart requests in a loop.

CVE-2023-25578 Affected Starlite Versions

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

References

Frequently Asked Questions

What is CVE-2023-25578?
CVE-2023-25578 is a security vulnerability in Starlite involving Denial of service vulnerability when parsing multipart request body under CWE-400: Uncontrolled Resource Consumption.
Which Starlite versions are affected?
Affected versions include releases prior to 1.51.2 across affected packages: starlite.
What version fixes CVE-2023-25578?
Upgrading to 1.51.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is starlite affected?
Yes, starlite is affected in releases prior to 1.51.2. Upgrade your dependency to 1.51.2 or later.
What is the CVSS score of CVE-2023-25578?
CVE-2023-25578 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:N/A:H.
What CWE is associated with CVE-2023-25578?
CVE-2023-25578 is classified under CWE-400: Uncontrolled Resource Consumption (The product does not properly control the allocation and maintenance of a limited resource.).
How can I check PyPI dependencies for CVE-2023-25578?
Run the dependency tree command: 'pip show starlite'. 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-p24m-863f-fm6q",
  "modified" : "2024-10-28T14:38:20Z",
  "published" : "2023-02-15T17:42:42Z",
  "aliases" : [ "CVE-2023-25578" ],
  "summary" : "Denial of service vulnerability when parsing multipart request body",
  "details" : "### Summary\n\nThe request body parsing in `starlite` allows a potentially unauthenticated\n attacker to consume a large amount of CPU time and RAM.\n\n### Details\n\nThe multipart body parser processes an unlimited number of file parts.\nThe multipart body parser processes an unlimited number of field parts.\n\n### Impact\n\nThis is a remote, potentially unauthenticated Denial of Service vulnerability.\n\nThis vulnerability affects applications with a request handler that accepts\n a `Body(media_type=RequestEncodingType.MULTI_PART)`.\n\nThe large amount of CPU time required for processing requests can block all\n available worker processes and significantly delay or slow down the processing\n of legitimate user requests.\nThe large amount of RAM accumulated while processing requests can lead to\n Out-Of-Memory kills.\nComplete DoS is achievable by sending many concurrent multipart requests in a\n loop.\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "starlite"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.51.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/starlite-api/starlite/security/advisories/GHSA-p24m-863f-fm6q"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-25578"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/starlite-api/starlite/commit/9674fe803628f986c03fe60769048cbc55b5bf83"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/starlite/PYSEC-2023-49.yaml"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/starlite-api/starlite"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/starlite-api/starlite/releases/tag/v1.51.2"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-400", "CWE-770" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-02-15T17:42:42Z",
    "nvd_published_at" : "2023-02-15T15:15:00Z"
  }
}