CVE-2022-40897

Aliases:GHSA-r9hx-vwmv-q579BIT-setuptools-2022-40897PYSEC-2022-43012
Advisory lineage Upstream: 0 Downstream: 23
Modified
Published: 22 Dec 2022, 00:00
Last modified:04 Nov 2025, 16:09

Vulnerability Summary

Overall Risk (default)
medium
34/100
CVSS Score
5.9 MEDIUM
v3.1 (cve.org)
EPSS Score
0.51% LOW
1% probability 0.00%
KEV
Not listed
Ransomware
No reports
Public exploits
1 found
Dark Web
Not detected

Timeline

22 Dec 2022, 00:00
Published
Vulnerability first disclosed
04 Nov 2025, 16:09
Last Modified
Vulnerability information updated

Description

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.

CVSS Metrics

  • v4.0HIGHScore: 8.7CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:L/SI:L/SA:N
  • v3.1MEDIUMScore: 5.9CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
  • v3.1HIGHScore: 7.5CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

EPSS Trends

Current EPSS score: 0.51% Percentile: 67%

Techniques & Countermeasures

  • CWE-1333Inefficient Regular Expression Complexity

    The product uses a regular expression with a worst-case computational complexity that is inefficient and possibly exponential.

Affected Systems

  • PyPIsetuptools

    < 43a9c9bfa6aa626ec2a22540bea28d2ca77964be | < 65.5.1

  • pythonsetuptools

    < 65.5.1

References (23)