CVE-2022-40897 — Python Packaging Authority (PyPA) setuptools before 65
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.
Published
2022-12-22T00:00:00.000Z
Last modified
2025-11-04T16:09:54.794Z
01What is this vulnerability?
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.
02Affected products
| Vendor | Product | Versions |
|---|
| n | a / n/a | n/a |
03Active exploitation status
Not currently listed on the CISA Known Exploited Vulnerabilities (KEV) catalog. EPSS is the best forward-looking signal — see the EPSS row above.
04Recommended remediation
- Patch to a fixed version listed in the vendor advisory (see references below).
- Mitigate with WAF rules, network egress filters, or feature flags where the patch is not yet available.
- Hunt historical logs for exploitation indicators — see Detection signatures below.
05Technical details
For the full vendor write-up, exploit chains, and reference implementations, see the references list in section 09.
06Detection signatures
Ask SARA in chat to draft a starting detection for this CVE in your stack of choice.
07Related CVEs
No directly-cited follow-up CVEs in the KB record for this advisory. The references list in section 09 carries the vendor cross-references.
08Timeline
- Published: 2022-12-22T00:00:00.000Z
- Last modified: 2025-11-04T16:09:54.794Z
09References
- github.com — https://github.com/pypa/setuptools/blob/fe8a98e696241487ba6ac9f91faa38ade939ec5d…
- pyup.io — https://pyup.io/posts/pyup-discovers-redos-vulnerabilities-in-top-python-package…
- github.com — https://github.com/pypa/setuptools/commit/43a9c9bfa6aa626ec2a22540bea28d2ca77964…
- pyup.io — https://pyup.io/vulnerabilities/CVE-2022-40897/52495/
- github.com — https://github.com/pypa/setuptools/compare/v65.5.0...v65.5.1
- security.netapp.com — https://security.netapp.com/advisory/ntap-20230214-0001/
- lists.fedoraproject.org — https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedorapro…
- lists.fedoraproject.org — https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedorapro…
- security.netapp.com — https://security.netapp.com/advisory/ntap-20240621-0006/
Want this in your SOAR or SIEM?
SARA's API returns EPSS, CVSS, KEV, and an analyst-grade summary in one call.
Read the API reference →