Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. starlette
  4. ›
  5. CVE-2023-30798

CVE-2023-30798: MultipartParser denial of service with too many fields or files

February 14, 2023 (updated October 28, 2024)

The MultipartParser using the package python-multipart accepts an unlimited number of multipart parts (form fields or files).

Processing too many parts results in high CPU usage and high memory usage, eventually leading to an OOM process kill.

This can be triggered by sending too many small form fields with no content, or too many empty files.

For this to take effect application code has to:

  • Have python-multipart installed and
  • call request.form()
  • or via another framework like FastAPI, using form field parameters or UploadFile parameters, which in turn calls request.form().

References

  • github.com/advisories/GHSA-74m5-2c7w-9w3x
  • github.com/encode/starlette
  • github.com/encode/starlette/commit/8c74c2c8dba7030154f8af18e016136bea1938fa
  • github.com/encode/starlette/security/advisories/GHSA-74m5-2c7w-9w3x
  • github.com/pypa/advisory-database/tree/main/vulns/starlette/PYSEC-2023-48.yaml
  • nvd.nist.gov/vuln/detail/CVE-2023-30798
  • vulncheck.com/advisories/starlette-multipartparser-dos

Code Behaviors & Features

Detect and mitigate CVE-2023-30798 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 0.25.0

Fixed versions

  • 0.25.0

Solution

Upgrade to version 0.25.0 or above.

Impact 7.5 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Learn more about CVSS

Weakness

  • CWE-400: Uncontrolled Resource Consumption

Source file

pypi/starlette/CVE-2023-30798.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:15:22 +0000.