CVE-2022-40897: pypa/setuptools vulnerable to Regular Expression Denial of Service (ReDoS)

CVE-2022-40897 · Severity: low · CVSS 3.1 · Published 2022-12-23

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.

Technologies: setuptools (PyPI). Vendors: PyPI.

Quick answers

Is CVE-2022-40897 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2022-40897 being exploited in the wild.
How severe is CVE-2022-40897?
Low severity, with a CVSS score of 3.1, published 23 December 2022.
Which products and versions are affected?
setuptools (PyPI) ECOSYSTEM:introduced=0,fixed=65.5.1, GIT:introduced=0,fixed=43a9c9bfa6aa626ec2a22540bea28d2ca77964be|ECOSYSTEM:introduced=0,fixed=65.5.1.
Is there a fix for CVE-2022-40897?
Yes. setuptools (PyPI): upgrade to 65.5.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
Am I affected by CVE-2022-40897?
Check whether you run setuptools (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • setuptools (PyPI): upgrade to 65.5.1 or later
    pip install "setuptools>=65.5.1"

Affected products

  • setuptools (PyPI) ECOSYSTEM:introduced=0,fixed=65.5.1, GIT:introduced=0,fixed=43a9c9bfa6aa626ec2a22540bea28d2ca77964be|ECOSYSTEM:introduced=0,fixed=65.5.1

Identifiers

  • CVE-2022-40897
  • GHSA-r9hx-vwmv-q579
  • PYSEC-2022-43012

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.