ubuntu-cve-2022-40897
Vulnerability from osv_ubuntu
Published
2022-12-23 00:15
Modified
2025-09-08 16:50
Summary
Details
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.
Severity
5.9 (Medium)
5.9 (Medium)
N/A (UNKNOWN)
References
{
"affected": [
{
"ecosystem_specific": {
"availability": "Available with Ubuntu Pro (Infra-only): https://ubuntu.com/pro",
"binaries": [
{
"binary_name": "python-pip",
"binary_version": "1.5.4-1ubuntu4+esm2"
},
{
"binary_name": "python-pip-whl",
"binary_version": "1.5.4-1ubuntu4+esm2"
},
{
"binary_name": "python3-pip",
"binary_version": "1.5.4-1ubuntu4+esm2"
}
]
},
"package": {
"ecosystem": "Ubuntu:Pro:14.04:LTS",
"name": "python-pip",
"purl": "pkg:deb/ubuntu/python-pip@1.5.4-1ubuntu4+esm2?arch=source\u0026distro=trusty/esm"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "1.5.4-1ubuntu4+esm2"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"1.4.1-2",
"1.5.4-1",
"1.5.4-1ubuntu1",
"1.5.4-1ubuntu3",
"1.5.4-1ubuntu4",
"1.5.4-1ubuntu4+esm1"
]
},
{
"ecosystem_specific": {
"availability": "Available with Ubuntu Pro (Infra-only): https://ubuntu.com/pro",
"binaries": [
{
"binary_name": "python-pkg-resources",
"binary_version": "3.3-1ubuntu2+esm1"
},
{
"binary_name": "python-setuptools",
"binary_version": "3.3-1ubuntu2+esm1"
},
{
"binary_name": "python-setuptools-whl",
"binary_version": "3.3-1ubuntu2+esm1"
},
{
"binary_name": "python3-pkg-resources",
"binary_version": "3.3-1ubuntu2+esm1"
},
{
"binary_name": "python3-setuptools",
"binary_version": "3.3-1ubuntu2+esm1"
}
]
},
"package": {
"ecosystem": "Ubuntu:Pro:14.04:LTS",
"name": "python-setuptools",
"purl": "pkg:deb/ubuntu/python-setuptools@3.3-1ubuntu2+esm1?arch=source\u0026distro=trusty/esm"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "3.3-1ubuntu2+esm1"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"1.4.2-1",
"2.0.1-1ubuntu1",
"2.0.1-2ubuntu1",
"2.0.2-1",
"2.1-1",
"2.2-1",
"3.3-1ubuntu1",
"3.3-1ubuntu2"
]
},
{
"ecosystem_specific": {
"availability": "Available with Ubuntu Pro (Infra-only): https://ubuntu.com/pro",
"binaries": [
{
"binary_name": "pypy-pkg-resources",
"binary_version": "20.7.0-1ubuntu0.1~esm1"
},
{
"binary_name": "pypy-setuptools",
"binary_version": "20.7.0-1ubuntu0.1~esm1"
},
{
"binary_name": "python-pkg-resources",
"binary_version": "20.7.0-1ubuntu0.1~esm1"
},
{
"binary_name": "python-setuptools",
"binary_version": "20.7.0-1ubuntu0.1~esm1"
},
{
"binary_name": "python3-pkg-resources",
"binary_version": "20.7.0-1ubuntu0.1~esm1"
},
{
"binary_name": "python3-setuptools",
"binary_version": "20.7.0-1ubuntu0.1~esm1"
}
]
},
"package": {
"ecosystem": "Ubuntu:Pro:16.04:LTS",
"name": "python-setuptools",
"purl": "pkg:deb/ubuntu/python-setuptools@20.7.0-1ubuntu0.1~esm1?arch=source\u0026distro=esm-infra/xenial"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "20.7.0-1ubuntu0.1~esm1"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"18.4-1",
"18.4-2",
"18.7-1",
"18.8-1",
"20.1.1-1",
"20.3.1-1",
"20.7.0-1"
]
},
{
"ecosystem_specific": {
"availability": "Available with Ubuntu Pro: https://ubuntu.com/pro",
"binaries": [
{
"binary_name": "python-pip",
"binary_version": "8.1.1-2ubuntu0.6+esm3"
},
{
"binary_name": "python-pip-whl",
"binary_version": "8.1.1-2ubuntu0.6+esm3"
},
{
"binary_name": "python3-pip",
"binary_version": "8.1.1-2ubuntu0.6+esm3"
}
]
},
"package": {
"ecosystem": "Ubuntu:Pro:16.04:LTS",
"name": "python-pip",
"purl": "pkg:deb/ubuntu/python-pip@8.1.1-2ubuntu0.6+esm3?arch=source\u0026distro=esm-apps/xenial"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "8.1.1-2ubuntu0.6+esm3"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"1.5.6-7ubuntu1",
"1.5.6-7ubuntu2",
"8.0.2-7",
"8.0.3-1",
"8.0.3-2",
"8.1.0-1",
"8.1.0-2",
"8.1.1-1",
"8.1.1-2",
"8.1.1-2ubuntu0.1",
"8.1.1-2ubuntu0.2",
"8.1.1-2ubuntu0.4",
"8.1.1-2ubuntu0.6",
"8.1.1-2ubuntu0.6+esm2"
]
},
{
"ecosystem_specific": {
"availability": "No subscription required",
"binaries": [
{
"binary_name": "python-pip",
"binary_version": "9.0.1-2.3~ubuntu1.18.04.6"
},
{
"binary_name": "python-pip-whl",
"binary_version": "9.0.1-2.3~ubuntu1.18.04.6"
},
{
"binary_name": "python3-pip",
"binary_version": "9.0.1-2.3~ubuntu1.18.04.6"
}
]
},
"package": {
"ecosystem": "Ubuntu:18.04:LTS",
"name": "python-pip",
"purl": "pkg:deb/ubuntu/python-pip@9.0.1-2.3~ubuntu1.18.04.6?arch=source\u0026distro=bionic"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "9.0.1-2.3~ubuntu1.18.04.6"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"9.0.1-2",
"9.0.1-2.3~ubuntu1",
"9.0.1-2.3~ubuntu1.18.04.1",
"9.0.1-2.3~ubuntu1.18.04.2",
"9.0.1-2.3~ubuntu1.18.04.3",
"9.0.1-2.3~ubuntu1.18.04.4",
"9.0.1-2.3~ubuntu1.18.04.5"
]
},
{
"ecosystem_specific": {
"availability": "No subscription required",
"binaries": [
{
"binary_name": "pypy-pkg-resources",
"binary_version": "39.0.1-2ubuntu0.1"
},
{
"binary_name": "pypy-setuptools",
"binary_version": "39.0.1-2ubuntu0.1"
},
{
"binary_name": "python-pkg-resources",
"binary_version": "39.0.1-2ubuntu0.1"
},
{
"binary_name": "python-setuptools",
"binary_version": "39.0.1-2ubuntu0.1"
},
{
"binary_name": "python3-pkg-resources",
"binary_version": "39.0.1-2ubuntu0.1"
},
{
"binary_name": "python3-setuptools",
"binary_version": "39.0.1-2ubuntu0.1"
}
]
},
"package": {
"ecosystem": "Ubuntu:18.04:LTS",
"name": "python-setuptools",
"purl": "pkg:deb/ubuntu/python-setuptools@39.0.1-2ubuntu0.1?arch=source\u0026distro=bionic"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "39.0.1-2ubuntu0.1"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"36.2.7-2",
"38.4.0-1",
"38.5.2-1",
"39.0.1-1",
"39.0.1-2"
]
},
{
"ecosystem_specific": {
"availability": "No subscription required",
"binaries": [
{
"binary_name": "python-pip-whl",
"binary_version": "20.0.2-5ubuntu1.7"
},
{
"binary_name": "python3-pip",
"binary_version": "20.0.2-5ubuntu1.7"
}
]
},
"package": {
"ecosystem": "Ubuntu:20.04:LTS",
"name": "python-pip",
"purl": "pkg:deb/ubuntu/python-pip@20.0.2-5ubuntu1.7?arch=source\u0026distro=focal"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "20.0.2-5ubuntu1.7"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"18.1-5",
"18.1-5build1",
"18.1-5ubuntu1",
"20.0.2-2",
"20.0.2-4",
"20.0.2-5",
"20.0.2-5ubuntu1",
"20.0.2-5ubuntu1.1",
"20.0.2-5ubuntu1.3",
"20.0.2-5ubuntu1.4",
"20.0.2-5ubuntu1.5",
"20.0.2-5ubuntu1.6"
]
},
{
"ecosystem_specific": {
"availability": "No subscription required",
"binaries": [
{
"binary_name": "pypy-pkg-resources",
"binary_version": "44.0.0-2ubuntu0.1"
},
{
"binary_name": "pypy-setuptools",
"binary_version": "44.0.0-2ubuntu0.1"
},
{
"binary_name": "python-pkg-resources",
"binary_version": "44.0.0-2ubuntu0.1"
},
{
"binary_name": "python-setuptools",
"binary_version": "44.0.0-2ubuntu0.1"
}
]
},
"package": {
"ecosystem": "Ubuntu:20.04:LTS",
"name": "python-setuptools",
"purl": "pkg:deb/ubuntu/python-setuptools@44.0.0-2ubuntu0.1?arch=source\u0026distro=focal"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "44.0.0-2ubuntu0.1"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"41.1.0-1",
"41.4.0-1",
"44.0.0-1",
"44.0.0-2"
]
},
{
"ecosystem_specific": {
"availability": "No subscription required",
"binaries": [
{
"binary_name": "python3-pkg-resources",
"binary_version": "45.2.0-1ubuntu0.1"
},
{
"binary_name": "python3-setuptools",
"binary_version": "45.2.0-1ubuntu0.1"
}
]
},
"package": {
"ecosystem": "Ubuntu:20.04:LTS",
"name": "setuptools",
"purl": "pkg:deb/ubuntu/setuptools@45.2.0-1ubuntu0.1?arch=source\u0026distro=focal"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "45.2.0-1ubuntu0.1"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"45.2.0-1"
]
},
{
"ecosystem_specific": {
"availability": "No subscription required",
"binaries": [
{
"binary_name": "python3-pip",
"binary_version": "22.0.2+dfsg-1ubuntu0.1"
},
{
"binary_name": "python3-pip-whl",
"binary_version": "22.0.2+dfsg-1ubuntu0.1"
}
]
},
"package": {
"ecosystem": "Ubuntu:22.04:LTS",
"name": "python-pip",
"purl": "pkg:deb/ubuntu/python-pip@22.0.2+dfsg-1ubuntu0.1?arch=source\u0026distro=jammy"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "22.0.2+dfsg-1ubuntu0.1"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"20.3.4-4",
"21.3.1+dfsg-3",
"22.0.2+dfsg-1"
]
},
{
"ecosystem_specific": {
"availability": "No subscription required",
"binaries": [
{
"binary_name": "pypy-pkg-resources",
"binary_version": "44.1.1-1.2ubuntu0.22.04.1"
},
{
"binary_name": "pypy-setuptools",
"binary_version": "44.1.1-1.2ubuntu0.22.04.1"
},
{
"binary_name": "python-pkg-resources",
"binary_version": "44.1.1-1.2ubuntu0.22.04.1"
},
{
"binary_name": "python-setuptools",
"binary_version": "44.1.1-1.2ubuntu0.22.04.1"
},
{
"binary_name": "python2-setuptools-whl",
"binary_version": "44.1.1-1.2ubuntu0.22.04.1"
}
]
},
"package": {
"ecosystem": "Ubuntu:22.04:LTS",
"name": "python-setuptools",
"purl": "pkg:deb/ubuntu/python-setuptools@44.1.1-1.2ubuntu0.22.04.1?arch=source\u0026distro=jammy"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "44.1.1-1.2ubuntu0.22.04.1"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"44.1.1-1",
"44.1.1-1.2"
]
},
{
"ecosystem_specific": {
"availability": "No subscription required",
"binaries": [
{
"binary_name": "python3-pkg-resources",
"binary_version": "59.6.0-1.2ubuntu0.22.04.1"
},
{
"binary_name": "python3-setuptools",
"binary_version": "59.6.0-1.2ubuntu0.22.04.1"
},
{
"binary_name": "python3-setuptools-whl",
"binary_version": "59.6.0-1.2ubuntu0.22.04.1"
}
]
},
"package": {
"ecosystem": "Ubuntu:22.04:LTS",
"name": "setuptools",
"purl": "pkg:deb/ubuntu/setuptools@59.6.0-1.2ubuntu0.22.04.1?arch=source\u0026distro=jammy"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "59.6.0-1.2ubuntu0.22.04.1"
}
],
"type": "ECOSYSTEM"
}
],
"versions": [
"52.0.0-4",
"58.2.0-1",
"59.6.0-1.2"
]
}
],
"aliases": [],
"details": "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.",
"id": "UBUNTU-CVE-2022-40897",
"modified": "2025-09-08T16:50:24Z",
"published": "2022-12-23T00:15:00Z",
"references": [
{
"type": "REPORT",
"url": "https://ubuntu.com/security/CVE-2022-40897"
},
{
"type": "REPORT",
"url": "https://github.com/pypa/setuptools/blob/fe8a98e696241487ba6ac9f91faa38ade939ec5d/setuptools/package_index.py#L200"
},
{
"type": "REPORT",
"url": "https://pyup.io/posts/pyup-discovers-redos-vulnerabilities-in-top-python-packages/"
},
{
"type": "REPORT",
"url": "https://github.com/pypa/setuptools/commit/43a9c9bfa6aa626ec2a22540bea28d2ca77964be"
},
{
"type": "ADVISORY",
"url": "https://ubuntu.com/security/notices/USN-5817-1"
},
{
"type": "REPORT",
"url": "https://www.cve.org/CVERecord?id=CVE-2022-40897"
}
],
"related": [
"USN-5817-1"
],
"schema_version": "1.7.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H",
"type": "CVSS_V3"
},
{
"score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H",
"type": "CVSS_V3"
},
{
"score": "medium",
"type": "Ubuntu"
}
],
"upstream": [
"CVE-2022-40897"
]
}
Loading…
Loading…
Experimental. This forecast is provided for visualization only and may change without notice. Do not use it for operational decisions.
Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Loading…
Loading…