{"id":"CVE-2022-40897","aliases":["CVE-2022-40897","GHSA-r9hx-vwmv-q579","BIT-SETUPTOOLS-2022-40897","PYSEC-2022-43012"],"related":[],"kind":"vulnerability","state":"published","title":"pypa/setuptools vulnerable to Regular Expression Denial of Service (ReDoS)","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"Python Packaging Authority (PyPA)'s setuptools is a library designed to facilitate packaging Python projects. Setuptools version 65.5.0 and earlier could allow remote attackers to cause a denial of service by fetching malicious HTML from a PyPI package or custom PackageIndex page due to a vulnerable Regular Expression in `package_index`. This has been patched in version 65.5.1.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Las herramientas de configuración Python Packaging Authority (PyPA) anteriores a 65.5.1 permiten a atacantes remotos provocar una Denegación de Servicio (DoS) a través de HTML en un paquete manipulado o en una página PackageIndex personalizada. Hay una Denegación de Servicio (DoS) de expresión regular (ReDoS) en package_index.py.","source":"nvd"}],"published":"2022-12-22T00:00:00.000Z","modified":"2026-09-08T08:48:19.335Z","severity":{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","score":5.9,"rating":"MEDIUM"},"severities":[{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","score":5.9,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H","score":5.9,"rating":"MEDIUM"},{"scorer":"Bitnami Vulnerability Database","scheme":"rating","rating":"MEDIUM"}],"cwes":["CWE-1333"],"affected":[{"ranges":[{"version":"n/a","status":"affected"}],"source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"65.5.1"}],"ecosystem":"PyPI","package":"setuptools","purl":"pkg:pypi/setuptools","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"65.5.1"}],"vendor":"python","product":"setuptools","cpe":"cpe:2.3:a:python:setuptools:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"git","introduced":"0","status":"affected","fixed":"43a9c9bfa6aa626ec2a22540bea28d2ca77964be"},{"type":"ecosystem","introduced":"0","status":"affected","fixed":"65.5.1"}],"ecosystem":"PyPI","package":"setuptools","purl":"pkg:pypi/setuptools","repo":"https://github.com/pypa/setuptools","source":"pysec"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"65.5.1"}],"ecosystem":"Bitnami","package":"setuptools","purl":"pkg:bitnami/setuptools","source":"bitnami"}],"references":[{"url":"https://github.com/pypa/setuptools/blob/fe8a98e696241487ba6ac9f91faa38ade939ec5d/setuptools/package_index.py#L200","tags":["advisory","third-party-advisory","web","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec","bitnami"]},{"url":"https://pyup.io/posts/pyup-discovers-redos-vulnerabilities-in-top-python-packages/","tags":["advisory","exploit","patch","technical-description","vendor-advisory","web","x-transferred"],"sources":["cvelist","nvd","pysec","bitnami"]},{"url":"https://github.com/pypa/setuptools/commit/43a9c9bfa6aa626ec2a22540bea28d2ca77964be","tags":["advisory","fix","patch","third-party-advisory","web","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec","bitnami"]},{"url":"https://pyup.io/vulnerabilities/CVE-2022-40897/52495/","tags":["advisory","third-party-advisory","web","x-transferred"],"sources":["cvelist","nvd","pysec","bitnami"]},{"url":"https://github.com/pypa/setuptools/compare/v65.5.0...v65.5.1","tags":["advisory","release-notes","third-party-advisory","web","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec","bitnami"]},{"url":"https://security.netapp.com/advisory/ntap-20230214-0001/","tags":["web","x-transferred"],"sources":["cvelist","nvd","bitnami"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/YNA2BAH2ACBZ4TVJZKFLCR7L23BG5C3H/","tags":["vendor-advisory","web","x-transferred"],"sources":["cvelist","nvd","bitnami"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ADES3NLOE5QJKBLGNZNI2RGVOSQXA37R/","tags":["vendor-advisory","web","x-transferred"],"sources":["cvelist","nvd","bitnami"]},{"url":"https://security.netapp.com/advisory/ntap-20240621-0006/","tags":["web","x-transferred"],"sources":["cvelist","nvd","bitnami"]},{"url":"https://lists.debian.org/debian-lts-announce/2024/09/msg00018.html","tags":["web"],"sources":["cvelist","ghsa","nvd","bitnami"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-40897","tags":["advisory","web"],"sources":["ghsa","bitnami"]},{"url":"https://github.com/pypa/setuptools/issues/3659","tags":["web"],"sources":["ghsa"]},{"url":"https://setuptools.pypa.io/en/latest","tags":["web"],"sources":["ghsa"]},{"url":"https://security.netapp.com/advisory/ntap-20240621-0006","tags":["web"],"sources":["ghsa"]},{"url":"https://security.netapp.com/advisory/ntap-20230214-0001","tags":["web"],"sources":["ghsa"]},{"url":"https://pyup.io/vulnerabilities/CVE-2022-40897/52495","tags":["web"],"sources":["ghsa"]},{"url":"https://pyup.io/posts/pyup-discovers-redos-vulnerabilities-in-top-python-packages","tags":["web"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/YNA2BAH2ACBZ4TVJZKFLCR7L23BG5C3H","tags":["web"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ADES3NLOE5QJKBLGNZNI2RGVOSQXA37R","tags":["web"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/YNA2BAH2ACBZ4TVJZKFLCR7L23BG5C3H","tags":["web"],"sources":["ghsa"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ADES3NLOE5QJKBLGNZNI2RGVOSQXA37R","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/pypa/setuptools","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/setuptools/PYSEC-2022-43012.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/advisories/GHSA-r9hx-vwmv-q579","tags":["advisory"],"sources":["pysec"]}],"credits":[],"assigner":"mitre","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-07-16T17:14:35.641Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-40897","url":"https://www.cve.org/CVERecord?id=CVE-2022-40897","licence":"CVE Terms of Use","modified":"2025-11-04T16:09:54.794Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-r9hx-vwmv-q579","url":"https://github.com/advisories/GHSA-r9hx-vwmv-q579","licence":"CC-BY-4.0","modified":"2026-08-07T08:12:25.181Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-40897","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-40897","licence":"Public domain","modified":"2026-06-17T05:02:12.993Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2022-43012","url":"https://osv.dev/vulnerability/PYSEC-2022-43012","licence":"CC-BY-4.0","modified":"2026-06-10T17:02:40.148Z"},{"source":"bitnami","name":"Bitnami Vulnerability Database","id":"BIT-SETUPTOOLS-2022-40897","url":"https://osv.dev/vulnerability/BIT-SETUPTOOLS-2022-40897","licence":"Apache-2.0","modified":"2026-09-08T08:48:19.335Z"}],"updatedAt":"2026-11-25T22:58:17.829Z","epss":{"score":0.02346,"percentile":0.84401,"date":"2026-11-30T12:00:22.000Z"}}