CVE-2022-40897: python setuptools
Vulnerability summary
CVE-2022-40897 is a medium (CVSS 5.9) vulnerability in python setuptools. EPSS estimates a 2.63% chance of exploitation in the next 30 days, higher than 85.5% of scored vulnerabilities. 1 public exploit is recorded.
Not severe (CVSS 5.9, network access); no exploitation reported by the 5 checked sources
Source freshness unavailable
How is this decided?Advisory lineage
Upstream 0 · Downstream 5 · Related 2Timeline
- 22-12-2022PublishedVulnerability first disclosed.
- 04-11-2025Last modifiedVulnerability 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
8 scores · 7 sources · 2 versions- OSV · PypiEcosystem advisory · calculated7.5HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HDiffers
- OSV · Red hatEcosystem advisory · calculated5.9MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
- OSV · UbuntuEcosystem advisory · calculated5.9MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
- OSV · DebianEcosystem advisory · calculated5.9MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
- OSV · ChainguardEcosystem advisory · calculated5.9MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
- NVDNIST5.9MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
EPSS trend
Probability
2.63%
Chance of exploitation in the next 30 days
Percentile
86%
Versus all other CVEs
30-day change
Increase +0.13 pp
From 2.50% on 04-10-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
1 foundExploit Reference (pyup.io)
Maturity: unknown
Weaknesses
CWE · root causeAffected systems
Known conditions: network-reachable, no authentication, no user interaction (CVSS vector). Other conditions: not stated in public data.
Redhat106 products
- Cython< 0:0.29.21-5.module+el8.4.0+9822+20bf1249
- Cython-debugsource< 0:0.29.21-5.module+el8.4.0+9822+20bf1249
- mod_wsgi< 0:4.7.1-5.module+el8.7.0+16654+645aad7f
- numpy< 0:1.19.4-3.module+el8.5.0+12204+54860423
- numpy-debugsource< 0:1.19.4-3.module+el8.5.0+12204+54860423
Suse32 products
- python-setuptools-test&distro=SUSE Linux Enterprise Module for Basesystem 15 SP4< 44.1.1-150400.3.3.1
- python-setuptools-test&distro=SUSE Linux Enterprise Real Time 15 SP3< 40.5.0-150100.6.6.1
- python-setuptools-wheel&distro=SUSE Linux Enterprise Module for Basesystem 15 SP4< 44.1.1-150400.3.3.1
- python-setuptools-wheel&distro=SUSE Linux Enterprise Real Time 15 SP3< 40.5.0-150100.6.6.1
- python-setuptools&distro=HPE Helion OpenStack 8< 36.5.0-3.3.1
Opensuse15 products
- python-setuptools-test&distro=openSUSE Leap 15.4< 44.1.1-150400.3.3.1
- python-setuptools-wheel&distro=openSUSE Leap 15.4< 44.1.1-150400.3.3.1
- python-setuptools&distro=openSUSE Leap 15.4< 44.1.1-150400.3.3.1
- python-setuptools&distro=openSUSE Leap Micro 5.2< 40.5.0-150100.6.6.1
- python-setuptools&distro=openSUSE Leap Micro 5.3< 44.1.1-150400.3.3.1
Ubuntu3 products
- python-pip< 1.5.4-1ubuntu4+esm2 | < 8.1.1-2ubuntu0.6+esm3 | < 9.0.1-2.3~ubuntu1.18.04.6 | < 20.0.2-5ubuntu1.7 | < 22.0.2+dfsg-1ubuntu0.1
- python-setuptools< 3.3-1ubuntu2+esm1 | < 20.7.0-1ubuntu0.1~esm1 | < 39.0.1-2ubuntu0.1 | < 44.0.0-2ubuntu0.1 | < 44.1.1-1.2ubuntu0.22.04.1
- setuptools< 45.2.0-1ubuntu0.1 | < 59.6.0-1.2ubuntu0.22.04.1
Chainguard2 products
- graalvm-24-graalpyAll versions (No fix recorded)
- graalvm-24-graalpy-venvAll versions (No fix recorded)
Debian1 product
- setuptools< 65.6.3-1
Mageia1 product
- python-setuptools< 56.2.0-1.1.mga8
PyPI1 product
- setuptools< 43a9c9bfa6aa626ec2a22540bea28d2ca77964be | < 65.5.1
Python1 product
- setuptools< 65.5.1
9 vendors · 162 products
References
56 links- github.com/pypa/setuptools/blob/fe8a98e696241487ba6ac9f91faa38ade939ec5d/setuptools/package_index.pyWEBREPORTThird Party Advisory
- pyup.io/posts/pyup-discovers-redos-vulnerabilities-in-top-python-packages/WEBREPORTExploitPatchTechnical DescriptionVendor Advisory
- github.com/pypa/setuptools/commit/43a9c9bfa6aa626ec2a22540bea28d2ca77964beWEBFIXREPORTPatchThird Party Advisory
Show all 56 references
- github.com/pypa/setuptoolsPACKAGE