CVE-2022-40897
MEDIUM 5.9CVSS 3.1pypa/setuptools vulnerable to Regular Expression Denial of Service (ReDoS)
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
- 23 Dec 2022
- Last modified
- 7 Aug 2026
- Assigned by
- cve@mitre.org
- NVD status
- Modified
- Weakness
- CWE-1333
- Also known as
- BIT-setuptools-2022-40897GHSA-r9hx-vwmv-q579PYSEC-2022-43012
- Sources
- NVDJSONOSV GHSA-r9hx-vwmv-q579JSONOSV PYSEC-2022-43012JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| OSV | GitHub | CVSS 4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:L/SI:L/SA:N | |
| OSV | GitHub | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | MEDIUM 5.9 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H |
| NVD | 134c704f-9b21-4f2e-91b3-4a467353bcc0 (Secondary) | CVSS 3.1 | MEDIUM 5.9 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | python | setuptoolscpe:2.3:a:python:setuptools:*:*:*:*:*:*:*:* |
< 65.5.1 | 65.5.1 |
| OSV | PyPI | setuptools | < 65.5.1 | 65.5.1 |
References
- https://github.com/pypa/setuptools/blob/fe8a98e696241487ba6ac9f91faa38ade939ec5d/setuptools/package_index.py#L200 · Third Party Advisory, WEB
- https://github.com/pypa/setuptools/commit/43a9c9bfa6aa626ec2a22540bea28d2ca77964be · Patch, Third Party Advisory, WEB, FIX
- https://github.com/pypa/setuptools/compare/v65.5.0...v65.5.1 · Release Notes, Third Party Advisory, WEB
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ADES3NLOE5QJKBLGNZNI2RGVOSQXA37R/ · WEB
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/YNA2BAH2ACBZ4TVJZKFLCR7L23BG5C3H/ · WEB
- https://pyup.io/posts/pyup-discovers-redos-vulnerabilities-in-top-python-packages/ · Exploit, Patch, Technical Description, Vendor Advisory, WEB
- https://pyup.io/vulnerabilities/CVE-2022-40897/52495/ · Third Party Advisory, WEB
- https://security.netapp.com/advisory/ntap-20230214-0001/ · WEB
- https://security.netapp.com/advisory/ntap-20240621-0006/ · WEB
- https://lists.debian.org/debian-lts-announce/2024/09/msg00018.html · WEB
- https://nvd.nist.gov/vuln/detail/CVE-2022-40897 · ADVISORY
- https://github.com/pypa/setuptools/issues/3659 · WEB
- https://setuptools.pypa.io/en/latest · WEB
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/YNA2BAH2ACBZ4TVJZKFLCR7L23BG5C3H · WEB
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ADES3NLOE5QJKBLGNZNI2RGVOSQXA37R · WEB
- https://github.com/pypa/setuptools · PACKAGE
- https://github.com/pypa/advisory-database/tree/main/vulns/setuptools/PYSEC-2022-43012.yaml · WEB
- https://github.com/advisories/GHSA-r9hx-vwmv-q579 · ADVISORY
History
- 25 Nov 2026 20:35 UTC · NVD: first stored (published 23 Dec 2022)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 23 Dec 2022)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 23 Dec 2022)