Inefficient Regular Expression Complexity Affecting python-multipart package, versions <0.0.5-2ubuntu0.1~esm1


Severity

Recommended
medium

Based on Ubuntu security rating.

Threat Intelligence

EPSS
1.52% (76th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-UBUNTU2204-PYTHONMULTIPART-6252991
  • published26 Feb 2026
  • disclosed5 Feb 2024

Introduced: 5 Feb 2024

CVE-2024-24762  (opens in a new tab)
CWE-1333  (opens in a new tab)

How to fix?

Upgrade Ubuntu:22.04 python-multipart to version 0.0.5-2ubuntu0.1~esm1 or higher.

NVD Description

Note: Versions mentioned in the description apply only to the upstream python-multipart package and not the python-multipart package as distributed by Ubuntu. See How to fix? for Ubuntu:22.04 relevant fixed versions and status.

python-multipart is a streaming multipart parser for Python. When using form data, python-multipart uses a Regular Expression to parse the HTTP Content-Type header, including options. An attacker could send a custom-made Content-Type option that is very difficult for the RegEx to process, consuming CPU resources and stalling indefinitely (minutes or more) while holding the main event loop. This means that process can't handle any more requests, leading to regular expression denial of service. This vulnerability has been patched in version 0.0.7.

CVSS Base Scores

version 3.1