CVE Vulnerabilities

CVE-2022-40897

Inefficient Regular Expression Complexity

Published: Dec 23, 2022 | Modified: Nov 07, 2023
CVSS 3.x
5.9
MEDIUM
Source:
NVD
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
CVSS 2.x
RedHat/V2
RedHat/V3
Ubuntu

Python Packaging Authority (PyPA) setuptools before 65.5.1 allows remote attackers to cause a denial of service via HTML in a crafted package or custom PackageIndex page. There is a Regular Expression Denial of Service (ReDoS) in package_index.py.

Weakness

The product uses a regular expression with an inefficient, possibly exponential worst-case computational complexity that consumes excessive CPU cycles.

Affected Software

Name Vendor Start Version End Version
Setuptools Python * 65.5.1 (excluding)

Extended Description

      Attackers can create crafted inputs that
      intentionally cause the regular expression to use
      excessive backtracking in a way that causes the CPU
      consumption to spike.

Potential Mitigations

References