Skip to main content
MEDIUM

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

  • CVE-2022-40897 Red Hat Product Security1,078 products fixed · 9 known affected

    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

  • RHSA-2024:6915 Red Hat Product Security339 products fixed

    Red Hat Security Advisory: python39:3.9 security update

  • RHSA-2024:4421 Red Hat Product Security229 products fixed

    Red Hat Security Advisory: python39:3.9 and python39-devel:3.9 security update

  • RHSA-2024:2987 Red Hat Product Security264 products fixed

    Red Hat Security Advisory: python27:2.7 security update

  • RHSA-2024:2985 Red Hat Product Security229 products fixed

    Red Hat Security Advisory: python39:3.9 and python39-devel:3.9 security update

  • RHSA-2023:7395 Red Hat Product Security4 products fixed

    Red Hat Security Advisory: python-setuptools security update

3 more advisories

Full record on NVD

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