Security readout for executives and security teams
Plain-English summary
CVE-2022-40897 affects PyPA setuptools before 65.5.1. A crafted package or custom package index page can trigger excessive regular-expression processing, causing denial of service. The main risk is disruption to Python build, packaging, or dependency-resolution workflows that process untrusted package metadata.
Executive priority
Treat as a moderate operational risk for software supply-chain and build infrastructure. Prioritize patching internet-connected or untrusted-package processing environments, but this is not supported as an active-exploitation emergency by the provided sources.
Technical view
The issue is a CWE-1333 regular expression denial of service in setuptools package_index.py. The CVE states remote attackers can cause availability impact via HTML in a crafted package or custom PackageIndex page. The published fix is associated with setuptools 65.5.1.
Likely exposure
Most exposure is in developer workstations, CI runners, build containers, packaging automation, or vendor products using vulnerable setuptools and parsing untrusted or attacker-influenced Python package indexes.
Exploitation context
The source bundle does not show CISA KEV listing or active exploitation. Exploitation evidence is limited to public vulnerability reports and advisories. The CVSS vector rates network attack possible but with high attack complexity and availability-only impact.
Researcher notes
Affected-product data in the CVE bundle is incomplete, listing vendor and product as n/a. Focus validation on reachable parsing paths, setuptools versions before 65.5.1, and downstream vendor packages rather than assuming runtime application exposure.
Mitigation direction
- Upgrade setuptools to version 65.5.1 or later where directly managed.
- Apply vendor or distribution updates for packaged setuptools versions.
- Review Fedora, Debian, NetApp, and other relevant vendor advisories.
- Restrict build systems to trusted package indexes where feasible.
- Check vendor guidance for embedded or appliance exposure.
Validation and detection
- Inventory setuptools versions in repositories, build images, and CI runners.
- Identify workflows using setuptools package_index.py or custom PackageIndex pages.
- Check whether package sources include untrusted or external indexes.
- Verify distribution package versions against vendor advisories.
- Confirm remediation by rechecking installed setuptools versions.
Public sources used
- CVE Program
- CVE List V5
- PyPA setuptools package_index.py reference
- PyUp ReDoS research post
- PyPA setuptools fix commit
- PyUp vulnerability entry
- PyPA setuptools 65.5.0 to 65.5.1 compare
- NetApp advisory NTAP-20230214-0001
- Fedora advisory FEDORA-2023-9992b32c1f
- Fedora advisory FEDORA-2023-60e2b22be0
- NetApp advisory NTAP-20240621-0006
- Debian LTS announcement
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
CWE-1333: Exact CWE lookup
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
Open ATT&CK lookupCVE-2022-40897 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
Open ATT&CK lookup- Severity
- Medium
- CVSS
- 5.9 (3.1)
- Known Exploited
- No
- Published
Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
CNA and ADP enrichment extracted from CVE v5
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
CVSS vector scores
1 official scoreWe collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H2.23.6Primary CVE scoreVulnerability scoring details
Base CVSS 3.1 score
5.9MediumVector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
Source materials
- CVE List V5 sourceCVE List V5
- https://github.com/pypa/setuptools/blob/fe8a98e696241487ba6ac9f91faa38ade939ec5d/setuptools/package_index.py#L200CVE reference
- https://pyup.io/posts/pyup-discovers-redos-vulnerabilities-in-top-python-packages/CVE reference
- https://github.com/pypa/setuptools/commit/43a9c9bfa6aa626ec2a22540bea28d2ca77964beCVE reference
- https://pyup.io/vulnerabilities/CVE-2022-40897/52495/CVE reference
- https://github.com/pypa/setuptools/compare/v65.5.0...v65.5.1CVE reference
- https://security.netapp.com/advisory/ntap-20230214-0001/CVE reference
- FEDORA-2023-9992b32c1fCVE reference · vendor-advisory
- FEDORA-2023-60e2b22be0CVE reference · vendor-advisory
- https://security.netapp.com/advisory/ntap-20240621-0006/CVE reference
- https://lists.debian.org/debian-lts-announce/2024/09/msg00018.htmlCVE reference
Products and packages named in the record
CWE details
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
Inefficient Regular Expression Complexity
Inefficient Regular Expression Complexity represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.
