LiveActive security incident?Get immediate response
CVE Record

CVE-2022-40897: Python Packaging Authority (PyPA) setuptools before 65.5.1 allows remote attackers to cause a denial of ser...

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.

MediumCVSS 5.9Not KEV-listedUpdated
Glexia's TakeAutomated analysismoderate

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.
Prepared
Confidence
high
Sources
12

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

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 · low confidence lookup

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 lookup
cve · low confidence lookup

CVE-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
Vulnerability profileCVE Program record
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

Official CVE source material

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.

1CVSS vectors
0Timeline events
0ADP providers
11Source links

CVSS vector scores

1 official score

We 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.

ScoreVersionSeverityVectorExploitImpactSource
5.9CVSS 3.1MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H2.23.6Primary CVE score

Vulnerability scoring details

Base CVSS 3.1 score

5.9Medium
CVSS 3.1 vector shape for CVE-2022-40897Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

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

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone
Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
n/an/an/aListed
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-1333 · source CWE mapping

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.