CVE & CISA-KEV Catalog

CVE-2022-40897

MEDIUMEPSS 85th pctl
5.9
CVSS v3
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.

How to fix

Remediation Available
setuptoolsDebian
Fixed in:65.6.3-1CVE-2022-40897
Fixed in:65.6.3-1CVE-2022-40897
Fixed in:65.6.3-1CVE-2022-40897
CythonRocky
Fixed in:0:0.28.1-7.module+el8.9.0+19487+7dc18407.src::python27:2.7RHSA-2024:2987
CythonRed Hat / RHEL
Fixed in:0:0.28.1-7.module+el8.9.0+19487+7dc18407.src::python27:2.7RHSA-2024:2987
Cython-0:0.29.21Red Hat / RHEL
Fixed in:5.module+el8.4.0+9822+20bf1249.src::python39-devel:3.9RHSA-2024:4421
Fixed in:5.module+el8.9.0+19644+d68f775d.src::python39-devel:3.9RHSA-2024:2985
Cython-0:0.29.21Rocky
Fixed in:5.module+el8.9.0+19644+d68f775d.src::python39-devel:3.9RHSA-2024:2985
Fixed in:5.module+el8.4.0+9822+20bf1249.src::python39-devel:3.9RHSA-2024:4421
Cython-debugsourceRed Hat / RHEL
Fixed in:0:0.28.1-7.module+el8.9.0+19487+7dc18407.x86_64::python27:2.7RHSA-2024:2987
Fixed in:0:0.28.1-7.module+el8.9.0+19487+7dc18407.s390x::python27:2.7RHSA-2024:2987
Fixed in:0:0.28.1-7.module+el8.9.0+19487+7dc18407.aarch64::python27:2.7RHSA-2024:2987
Fixed in:0:0.28.1-7.module+el8.9.0+19487+7dc18407.ppc64le::python27:2.7RHSA-2024:2987
Cython-debugsourceRocky
Fixed in:0:0.28.1-7.module+el8.9.0+19487+7dc18407.s390x::python27:2.7RHSA-2024:2987
Fixed in:0:0.28.1-7.module+el8.9.0+19487+7dc18407.x86_64::python27:2.7RHSA-2024:2987
Fixed in:0:0.28.1-7.module+el8.9.0+19487+7dc18407.ppc64le::python27:2.7RHSA-2024:2987
Fixed in:0:0.28.1-7.module+el8.9.0+19487+7dc18407.aarch64::python27:2.7RHSA-2024:2987
Cython-debugsource-0:0.29.21Rocky
Fixed in:5.module+el8.9.0+19644+d68f775d.x86_64::python39-devel:3.9RHSA-2024:2985
Fixed in:5.module+el8.9.0+19644+d68f775d.aarch64::python39-devel:3.9RHSA-2024:2985
Fixed in:5.module+el8.4.0+9822+20bf1249.s390x::python39-devel:3.9RHSA-2024:4421
Fixed in:5.module+el8.4.0+9822+20bf1249.aarch64::python39-devel:3.9RHSA-2024:4421
Fixed in:5.module+el8.9.0+19644+d68f775d.s390x::python39-devel:3.9RHSA-2024:2985
Fixed in:5.module+el8.4.0+9822+20bf1249.ppc64le::python39-devel:3.9RHSA-2024:4421
Fixed in:5.module+el8.4.0+9822+20bf1249.x86_64::python39-devel:3.9RHSA-2024:4421
Fixed in:5.module+el8.9.0+19644+d68f775d.ppc64le::python39-devel:3.9RHSA-2024:2985
Cython-debugsource-0:0.29.21Red Hat / RHEL
Fixed in:5.module+el8.4.0+9822+20bf1249.aarch64::python39-devel:3.9RHSA-2024:4421
Fixed in:5.module+el8.4.0+9822+20bf1249.s390x::python39-devel:3.9RHSA-2024:4421
Fixed in:5.module+el8.4.0+9822+20bf1249.ppc64le::python39-devel:3.9RHSA-2024:4421
Fixed in:5.module+el8.9.0+19644+d68f775d.aarch64::python39-devel:3.9RHSA-2024:2985
Fixed in:5.module+el8.9.0+19644+d68f775d.ppc64le::python39-devel:3.9RHSA-2024:2985
Fixed in:5.module+el8.9.0+19644+d68f775d.s390x::python39-devel:3.9RHSA-2024:2985
Fixed in:5.module+el8.9.0+19644+d68f775d.x86_64::python39-devel:3.9RHSA-2024:2985
Fixed in:5.module+el8.4.0+9822+20bf1249.x86_64::python39-devel:3.9RHSA-2024:4421
PyYAMLRed Hat / RHEL
Fixed in:0:3.12-16.module+el8.9.0+19487+7dc18407.src::python27:2.7RHSA-2024:2987
Fixed in:0:5.4.1-1.module+el8.5.0+10613+59a13ec4.src::python39:3.9RHSA-2024:4421
Fixed in:0:5.4.1-1.module+el8.9.0+19644+d68f775d.src::python39:3.9RHSA-2024:2985
Fixed in:0:5.4.1-1.module+el8.5.0+10613+59a13ec4.src::python39:3.9RHSA-2024:6915
PyYAMLRocky
Fixed in:0:3.12-16.module+el8.9.0+19487+7dc18407.src::python27:2.7RHSA-2024:2987
Fixed in:0:5.4.1-1.module+el8.9.0+19644+d68f775d.src::python39:3.9RHSA-2024:2985
Fixed in:0:5.4.1-1.module+el8.5.0+10613+59a13ec4.src::python39:3.9RHSA-2024:6915
Fixed in:0:5.4.1-1.module+el8.5.0+10613+59a13ec4.src::python39:3.9RHSA-2024:4421
PyYAML-debugsourceRed Hat / RHEL
Fixed in:0:5.4.1-1.module+el8.5.0+10613+59a13ec4.x86_64::python39:3.9RHSA-2024:4421
Fixed in:0:5.4.1-1.module+el8.5.0+10613+59a13ec4.s390x::python39:3.9RHSA-2024:6915
Fixed in:0:3.12-16.module+el8.9.0+19487+7dc18407.aarch64::python27:2.7RHSA-2024:2987
Fixed in:0:3.12-16.module+el8.9.0+19487+7dc18407.ppc64le::python27:2.7RHSA-2024:2987
Fixed in:0:3.12-16.module+el8.9.0+19487+7dc18407.s390x::python27:2.7RHSA-2024:2987
Fixed in:0:3.12-16.module+el8.9.0+19487+7dc18407.x86_64::python27:2.7RHSA-2024:2987
Fixed in:0:5.4.1-1.module+el8.5.0+10613+59a13ec4.aarch64::python39:3.9RHSA-2024:4421
Fixed in:0:5.4.1-1.module+el8.9.0+19644+d68f775d.x86_64::python39:3.9RHSA-2024:2985
PyYAML-debugsourceRocky
Fixed in:0:5.4.1-1.module+el8.5.0+10613+59a13ec4.aarch64::python39:3.9RHSA-2024:6915
Fixed in:0:5.4.1-1.module+el8.5.0+10613+59a13ec4.x86_64::python39:3.9RHSA-2024:6915
Fixed in:0:5.4.1-1.module+el8.5.0+10613+59a13ec4.x86_64::python39:3.9RHSA-2024:4421
Fixed in:0:5.4.1-1.module+el8.9.0+19644+d68f775d.x86_64::python39:3.9RHSA-2024:2985
Fixed in:0:5.4.1-1.module+el8.5.0+10613+59a13ec4.ppc64le::python39:3.9RHSA-2024:4421
Fixed in:0:5.4.1-1.module+el8.9.0+19644+d68f775d.s390x::python39:3.9RHSA-2024:2985
Fixed in:0:5.4.1-1.module+el8.9.0+19644+d68f775d.ppc64le::python39:3.9RHSA-2024:2985
Fixed in:0:5.4.1-1.module+el8.9.0+19644+d68f775d.aarch64::python39:3.9RHSA-2024:2985
babelRocky
Fixed in:0:2.5.1-10.module+el8.9.0+19487+7dc18407.src::python27:2.7RHSA-2024:2987
Fixed in:0:2.5.1-10.module+el8.9.0+19487+7dc18407.noarch::python27:2.7RHSA-2024:2987
babelRed Hat / RHEL
Fixed in:0:2.5.1-10.module+el8.9.0+19487+7dc18407.noarch::python27:2.7RHSA-2024:2987
Fixed in:0:2.5.1-10.module+el8.9.0+19487+7dc18407.src::python27:2.7RHSA-2024:2987
mod_wsgiRocky
Fixed in:0:4.7.1-5.module+el8.7.0+16654+645aad7f.src::python39:3.9RHSA-2024:4421
Fixed in:0:4.7.1-7.module+el8.9.0+19644+d68f775d.src::python39:3.9RHSA-2024:2985
Fixed in:0:4.7.1-4.module+el8.4.0+9822+20bf1249.src::python39:3.9RHSA-2024:6915
mod_wsgiRed Hat / RHEL
Fixed in:0:4.7.1-5.module+el8.7.0+16654+645aad7f.src::python39:3.9RHSA-2024:4421
Fixed in:0:4.7.1-4.module+el8.4.0+9822+20bf1249.src::python39:3.9RHSA-2024:6915
Fixed in:0:4.7.1-7.module+el8.9.0+19644+d68f775d.src::python39:3.9RHSA-2024:2985
numpyRocky
Fixed in:0:1.19.4-3.module+el8.5.0+12204+54860423.src::python39:3.9RHSA-2024:4421
Fixed in:0:1.19.4-3.module+el8.5.0+12204+54860423.src::python39:3.9RHSA-2024:6915
Fixed in:0:1.19.4-3.module+el8.9.0+19644+d68f775d.src::python39:3.9RHSA-2024:2985
Fixed in:1:1.14.2-16.module+el8.9.0+19487+7dc18407.src::python27:2.7RHSA-2024:2987
numpyRed Hat / RHEL
Fixed in:0:1.19.4-3.module+el8.5.0+12204+54860423.src::python39:3.9RHSA-2024:4421
Fixed in:0:1.19.4-3.module+el8.9.0+19644+d68f775d.src::python39:3.9RHSA-2024:2985
Fixed in:1:1.14.2-16.module+el8.9.0+19487+7dc18407.src::python27:2.7RHSA-2024:2987
Fixed in:0:1.19.4-3.module+el8.5.0+12204+54860423.src::python39:3.9RHSA-2024:6915
numpy-debugsourceRed Hat / RHEL
Fixed in:0:1.19.4-3.module+el8.5.0+12204+54860423.s390x::python39:3.9RHSA-2024:4421
Fixed in:0:1.19.4-3.module+el8.9.0+19644+d68f775d.x86_64::python39:3.9RHSA-2024:2985
Fixed in:0:1.19.4-3.module+el8.9.0+19644+d68f775d.s390x::python39:3.9RHSA-2024:2985
Fixed in:0:1.19.4-3.module+el8.9.0+19644+d68f775d.ppc64le::python39:3.9RHSA-2024:2985
Fixed in:0:1.19.4-3.module+el8.9.0+19644+d68f775d.aarch64::python39:3.9RHSA-2024:2985
Fixed in:0:1.19.4-3.module+el8.5.0+12204+54860423.aarch64::python39:3.9RHSA-2024:6915
Fixed in:0:1.19.4-3.module+el8.5.0+12204+54860423.ppc64le::python39:3.9RHSA-2024:4421
Fixed in:0:1.19.4-3.module+el8.5.0+12204+54860423.x86_64::python39:3.9RHSA-2024:6915
numpy-debugsourceRocky
Fixed in:0:1.19.4-3.module+el8.9.0+19644+d68f775d.x86_64::python39:3.9RHSA-2024:2985
Fixed in:0:1.19.4-3.module+el8.5.0+12204+54860423.ppc64le::python39:3.9RHSA-2024:4421
Fixed in:0:1.19.4-3.module+el8.5.0+12204+54860423.x86_64::python39:3.9RHSA-2024:4421
Fixed in:1:1.14.2-16.module+el8.9.0+19487+7dc18407.aarch64::python27:2.7RHSA-2024:2987
Fixed in:0:1.19.4-3.module+el8.5.0+12204+54860423.ppc64le::python39:3.9RHSA-2024:6915
Fixed in:1:1.14.2-16.module+el8.9.0+19487+7dc18407.ppc64le::python27:2.7RHSA-2024:2987
Fixed in:1:1.14.2-16.module+el8.9.0+19487+7dc18407.s390x::python27:2.7RHSA-2024:2987
Fixed in:0:1.19.4-3.module+el8.5.0+12204+54860423.x86_64::python39:3.9RHSA-2024:6915
platform-python-setuptoolsRed Hat / RHEL
Fixed in:0:39.2.0-7.el8_6RHSA-2023:7395
platform-python-setuptoolsRocky
Fixed in:0:39.2.0-7.el8_6RHSA-2023:7395
pybind11-0:2.7.1Rocky
Fixed in:1.module+el8.9.0+19644+d68f775d.src::python39-devel:3.9RHSA-2024:2985
Fixed in:1.module+el8.6.0+12838+640e6226.src::python39-devel:3.9RHSA-2024:4421
pybind11-0:2.7.1Red Hat / RHEL
Fixed in:1.module+el8.6.0+12838+640e6226.src::python39-devel:3.9RHSA-2024:4421
Fixed in:1.module+el8.9.0+19644+d68f775d.src::python39-devel:3.9RHSA-2024:2985
pytestRocky
Fixed in:0:3.4.2-13.module+el8.9.0+19487+7dc18407.src::python27:2.7RHSA-2024:2987
pytestRed Hat / RHEL
Fixed in:0:3.4.2-13.module+el8.9.0+19487+7dc18407.src::python27:2.7RHSA-2024:2987
pytest-0:6.0.2Red Hat / RHEL
Fixed in:2.module+el8.9.0+19644+d68f775d.src::python39-devel:3.9RHSA-2024:2985
Fixed in:2.module+el8.4.0+9822+20bf1249.src::python39-devel:3.9RHSA-2024:4421
pytest-0:6.0.2Rocky
Fixed in:2.module+el8.4.0+9822+20bf1249.src::python39-devel:3.9RHSA-2024:4421
Fixed in:2.module+el8.9.0+19644+d68f775d.src::python39-devel:3.9RHSA-2024:2985
python-PyMySQLRed Hat / RHEL
Fixed in:0:0.8.0-10.module+el8.9.0+19487+7dc18407.src::python27:2.7RHSA-2024:2987
Fixed in:0:0.10.1-2.module+el8.9.0+19644+d68f775d.src::python39:3.9RHSA-2024:2985
Fixed in:0:0.10.1-2.module+el8.4.0+9822+20bf1249.src::python39:3.9RHSA-2024:4421
Fixed in:0:0.10.1-2.module+el8.4.0+9822+20bf1249.src::python39:3.9RHSA-2024:6915

This vulnerability affects an unusually large number of packages. The highest-confidence fixes are shown above; the full list is longer. Check the referenced advisories for complete coverage.

TridentStack Control can deploy fixes like this automatically across your Windows, macOS, and Linux fleet. See how it works

Remediation is compiled from vendor and distribution security advisories. Always confirm against the linked source for your exact version and platform.

CVSS v3 Vector

Exploitability

Attack VectorNetwork
Attack ComplexityHigh
Privileges RequiredNone
User InteractionNone
ScopeUnchanged

Impact

ConfidentialityNone
IntegrityNone
AvailabilityHigh

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H

Exploit Intelligence

2.62%probability of exploitation in 30 days
85thpercentile

Elevated risk: more likely to be exploited than 85% of all known CVEs.

References

Related Vulnerabilities

Other CWE-1333 vulnerabilities, ordered by exploit likelihood. View all

CVESeverityCVSSEPSSExploitedFix
CVE-2023-3364High7.544%-Fix
CVE-2024-8124High7.540%-Fix
CVE-2024-25126Medium5.335%-Fix
CVE-2024-2651Medium6.533%-Fix
CVE-2021-32837High7.529%-Fix
CVE-2024-2829High7.526%-Fix

Common questions

How do I fix CVE-2022-40897?

Published advisories record a fix for 463 affected products. The "How to fix" section on this page lists the fixed version and source advisory for each one, so apply the entry matching what you actually run.

Is CVE-2022-40897 being actively exploited?

Not that we know of. CVE-2022-40897 is not in the CISA Known Exploited Vulnerabilities catalog. Its EPSS score of 2.6% is the estimated probability that it will be exploited in the next 30 days. That is higher than 85% of all scored CVEs.

How severe is CVE-2022-40897?

CVE-2022-40897 has a CVSS v3 base score of 5.9, rated medium. CVSS rates the technical impact if the vulnerability is exploited, not how likely that is, so weigh it alongside the exploit-prediction score when you decide what to patch first.

What does CVE-2022-40897 affect?

Published advisories record a fix for setuptools (Debian), Cython (Rocky), Cython (Red Hat / RHEL), Cython-0:0.29.21 (Red Hat / RHEL), and 459 more. Only products with a sourced advisory are listed, so treat this as what we can cite rather than a complete inventory.

Embed a live status badge for CVE-2022-40897
CVE-2022-40897 severity badge

Markdown

[![CVE-2022-40897](https://tridentstack.com/cve/badge/CVE-2022-40897.svg)](https://tridentstack.com/cve/CVE-2022-40897)

HTML

<a href="https://tridentstack.com/cve/CVE-2022-40897"><img src="https://tridentstack.com/cve/badge/CVE-2022-40897.svg" alt="CVE-2022-40897"></a>

Find and fix vulnerabilities across your fleet

TridentStack Control continuously scans your Windows, macOS, and Linux fleet for known vulnerabilities, prioritizes them by severity and active exploitation, and patches them automatically.

See how it worksStart freeThis CVE lookup is free and always will be.

This product uses NVD data but is not endorsed or certified by the NVD. EPSS scores courtesy of FIRST.org (https://www.first.org/epss). Source: CISA KEV Catalog. Data as of 2025-11-04.