VDB

CVE-2022-40897

CVE-2022-40897 PUBLISHED CVSS 5.900000095367432 MEDIUM

pypa/setuptools vulnerable to Regular Expression Denial of Service (ReDoS)

Reported by mitre · Published December 22, 2022

setuptools is fixed in 65.5.1 and 43a9c9bfa6aa626ec2a22540bea28d2ca77964be (PyPI)

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.

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
setuptoolsPyPI65.5.1, 43a9c9bfa6aa626ec2a22540bea28d2ca77964be
python2-setuptoolsAmazon Linux41.2.0-4.amzn2.0.3
setuptoolsBitnami65.5.1
python3-setuptools-wheelAmazon Linux59.6.0-2.amzn2023.0.4
python3-setuptoolsAmazon Linux59.6.0-2.amzn2023.0.4
python-setuptools-wheelAmazon Linux49.1.3-1.amzn2.0.3
pytorch-cuda-11.8Chainguard2.3.1-r1
setuptoolspython65.5.1
setuptoolsBitnami65.5.1

Risk scores

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

Affected products

VendorProductVersions
n/an/an/a
amazon:2python2-setuptools0
amazon:2023python3-setuptools-wheel0
amazon:2023python3-setuptools0
amazon:2python-setuptools-wheel0
chainguardpytorch-cuda-11.80
PyPIsetuptools0
n/an/a*
chainguardpytorch-cuda120
amazon:2python3-setuptools0

Timeline

  • Dec 22, 2022 CVE Published
  • Dec 23, 2022 EPSS Score (30 in total, the first dated here)
  • Mar 9, 2026 Security Advisory (59 in total, the first dated here)
  • Jun 16, 2026 Coalition ESS Score
  • Nov 21, 2026 Distribution Patch (54 in total, the first dated here)

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2022-40897
vulnetix vdb fixes CVE-2022-40897

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2022-40897/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›