CVE-2022-40897
CVSS v3
5.9
MEDIUM
EPSS Score
2.5 %
exploit probability, as of 2026-10-12
CISA KEV
No
known exploited
Exploitation
—
SSVC status
Get an alert for each new CVE published for setuptools. Watch setuptools in CVE Watch Free account · no credit card
Affected and fixed versions
Packages from OSV.dev and products from the vendors' CSAF advisories.
version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.
Packages
- setuptoolsPyPIall versions · fixed in 65.5.1
- setuptoolsBitnamiall versions · fixed in 65.5.1
- babelAlmaLinux:8all versions · fixed in 2.5.1-10.module_el8.6.0+2781+fed64c13and 1 other package
- python-sqlalchemy-docAlmaLinux:8all versions · fixed in 1.3.2-2.module_el8.6.0+2781+fed64c13
- python2AlmaLinux:8all versions · fixed in 2.7.18-17.module_el8.10.0+3783+2756348e.almaand 6 other packages
- python2-attrsAlmaLinux:8all versions · fixed in 17.4.0-10.module_el8.6.0+2781+fed64c13
- python2-backportsAlmaLinux:8all versions · fixed in 1.0-16.module_el8.6.0+3162+01a09e5a
- python2-backports-ssl_match_hostnameAlmaLinux:8all versions · fixed in 3.5.0.1-12.module_el8.6.0+2781+fed64c13
77 more package ranges on OSV.dev
Vendor advisories
pypa-setuptools: Regular Expression Denial of Service (ReDoS) in package_index.py
python-setuptools.src as a component of Red Hat Enterprise Linux 6 · python-setuptools as a component of Red Hat Enterprise Linux 7 · python-setuptools.src as a component of Red Hat Enterprise Linux 7
Red Hat Security Advisory: python39:3.9 security update
Red Hat Security Advisory: python39:3.9 and python39-devel:3.9 security update
Red Hat Security Advisory: python27:2.7 security update
Red Hat Security Advisory: python39:3.9 and python39-devel:3.9 security update
Red Hat Security Advisory: python-setuptools security update
3 more advisories
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.
Technical details
- Published
- 2022-12-23
Frequently asked questions
What is CVE-2022-40897?
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.
Is CVE-2022-40897 actively exploited?
Active exploitation of CVE-2022-40897 has not been confirmed. Its EPSS score was 2.5% on 2026-10-12, the estimated probability of exploitation in the next 30 days.
What is the CVSS score for CVE-2022-40897?
CVE-2022-40897 has a CVSS v3 base score of 5.9 (MEDIUM severity).
Running setuptools? Hear about its next vulnerability
CVE Watch matches each new CVE to the vendors and products you list (vendor and product, not the version) and puts it in your alerts with its KEV and EPSS status.
Already have an account? Open CVE Watch
No credit card required · 50 free checks/month · Free API key
Go further
- Following what attackers exploit right now? The CISA KEV additions of the month, with their patch deadlines.
- Running this software? CVE Watch alerts you to new vulnerabilities in your products.
Related vulnerabilities
Same product first, then the same vendor advisory and the same publication week.
- CVE-2023-24329same product
- CVE-2021-3737same product
- CVE-2022-0391same product
- CVE-2022-48565same product
- CVE-2021-3733same product
- CVE-2015-20107same product
- CVE-2022-45061same product
- CVE-2025-47273same productsetuptools has a path traversal vulnerability in PackageIndex.download that leads to Arbitrary File Write