Vulnerabilities · 2022 · Python
CVE-2022-40897
Python Setuptools 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.
Affected products
Setuptools. The exact versions are in the references.
What to do now
- Check your exposureFind out whether Python Setuptools runs anywhere in your environment, including systems of suppliers.
- UpdateInstall the version in which the vendor fixed the vulnerability. The references lead to the advisory.
- Limit access until thenIf you cannot update at once, take the system off the internet or restrict who can reach it.
References
- pyup.io/posts/pyup-discovers-redos-vulnerabilities-in-top-python-packages/ · Exploit
- pyup.io/vulnerabilities/CVE-2022-40897/52495/ · Third Party Advisory
- nvd.nist.gov/vuln/detail/CVE-2022-40897
- github.com/pypa/setuptools/blob/fe8a98e696241487ba6ac9f91faa38ade939ec5d/setuptools/packag
- github.com/pypa/setuptools/issues/3659
- github.com/pypa/setuptools/commit/43a9c9bfa6aa626ec2a22540bea28d2ca77964be
- github.com/pypa/setuptools/compare/v65.5.0...v65.5.1
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/A
- nvd.nist.gov/vuln/detail/CVE-2022-40897
- cve.org/CVERecord?id=CVE-2022-40897
More vulnerabilities in Python products
CVE-2026-21441CVE-2025-66471CVE-2025-66418CVE-2025-50182CVE-2025-50181CVE-2025-48379CVE-2025-47273CVE-2025-13837All 231
Data: CVE list and the NVD. This product uses data from the NVD API but is not endorsed or certified by the NVD.