CVE-2022-40897

5.9 MEDIUM
Published: December 23, 2022 Modified: November 04, 2025

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.

AI Explanation

Get an AI-powered plain-language explanation of this vulnerability and remediation steps.

Login to generate AI explanation

CVSS v3.x Details

0.0 Low Medium High Critical 10.0
Vector String
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H

References to Advisories, Solutions, and Tools

Patch Vendor Advisory Exploit Third Party Advisory
https://github.com/pypa/setuptools/compare/v65.5.0...v65.5.1
Source: cve@mitre.org
Release Notes Third Party Advisory
https://pyup.io/posts/pyup-discovers-redos-vulnerabilities-in-top-python-packages/
Source: cve@mitre.org
Exploit Patch Technical Description Vendor Advisory
https://pyup.io/vulnerabilities/CVE-2022-40897/52495/
Source: cve@mitre.org
Third Party Advisory
https://github.com/pypa/setuptools/commit/43a9c9bfa6aa626ec2a22540bea28d2ca77964be
Source: af854a3a-2127-422b-91ae-364da2661108
Patch Third Party Advisory
https://github.com/pypa/setuptools/compare/v65.5.0...v65.5.1
Source: af854a3a-2127-422b-91ae-364da2661108
Release Notes Third Party Advisory
https://pyup.io/posts/pyup-discovers-redos-vulnerabilities-in-top-python-packages/
Source: af854a3a-2127-422b-91ae-364da2661108
Exploit Patch Technical Description Vendor Advisory
https://pyup.io/vulnerabilities/CVE-2022-40897/52495/
Source: af854a3a-2127-422b-91ae-364da2661108
Third Party Advisory
https://security.netapp.com/advisory/ntap-20230214-0001/
Source: af854a3a-2127-422b-91ae-364da2661108
https://security.netapp.com/advisory/ntap-20240621-0006/
Source: af854a3a-2127-422b-91ae-364da2661108

19 reference(s) from NVD

Quick Stats

CVSS v3 Score
5.9 / 10.0
EPSS (Exploit Probability)
0.5%
63th percentile
Exploitation Status
Not in CISA KEV

Weaknesses (CWE)

Affected Vendors

python