pycares — security advisory
pycares is a Python module which provides an interface to c-ares. c-ares is a C library that performs DNS requests and name resolutions asynchronously. Prior to version 4.9.0, pycares is vulnerable to a use-after-free condition that occurs when a Channel object is garbage collected while DNS queries are still pending. This results in a fatal Python error and interpreter crash. The vulnerability has been fixed in pycares 4.9.0 by implementing a safe channel destruction mechanism.
- Products
- pycares
- Affected versions
- 2.1.1-2.1, 2.1.1-2build2, 2.1.1-2build4, 2.1.1-2build5, 3.1.0-3, 3.1.0-4, 3.1.1-1, 3.1.1-1build1, 3.1.1-1build3, 3.1.1-1build5, 4.1.2-2, 4.1.2-2build1, 4.3.0-2, 4.3.0-2build1, 4.4.0-1, 4.4.0-1build1, 4.4.0-1build2, 4.4.0-2build2, 4.4.0-2build3, 4.9.0-1, 5.0.0-2, 5.0.1-2, 5.0.1-3
- Fixed versions
- Not specified
- CVEs
- CVE-2025-48945
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 31 Oct 2026, 01:32 UTC · Revision 1
Source evidence
pycares is a Python module which provides an interface to c-ares. c-ares is a C library that performs DNS requests and name resolutions asynchronously. Prior to version 4.9.0, pycares is vulnerable to a use-after-free condition that occurs when a Channel object is garbage collected while DNS queries are still pending. This results in a fatal Python error and interpreter crash. The vulnerability has been fixed in pycares 4.9.0 by implementing a safe channel destruction mechanism.
osv:UBUNTU-CVE-2025-48945
pycares
Fixed versions: Not specified
pycares
Fixed versions: Not specified
pycares
Fixed versions: Not specified
pycares
Fixed versions: Not specified
pycares
Fixed versions: Not specified
pycares
Fixed versions: Not specified
pycares
Fixed versions: Not specified
Complete source record
{
"id": "145e844c5ab4f68aebd60358b643477e1978b7f465f8d93e1e5cc0f5135d58fc",
"url": "https://osv.dev/vulnerability/UBUNTU-CVE-2025-48945",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "UBUNTU-CVE-2025-48945",
"summary": "pycares is a Python module which provides an interface to c-ares. c-ares is a C library that performs DNS requests and name resolutions asynchronously. Prior to version 4.9.0, pycares is vulnerable to a use-after-free condition that occurs when a Channel object is garbage collected while DNS queries are still pending. This results in a fatal Python error and interpreter crash. The vulnerability has been fixed in pycares 4.9.0 by implementing a safe channel destruction mechanism.",
"evidence": "osv:UBUNTU-CVE-2025-48945",
"products": [
{
"name": {
"value": "pycares",
"evidence": "/affected/0/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "2.1.1-2build2",
"evidence": "/affected/0/versions"
}
]
},
{
"name": {
"value": "pycares",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "2.1.1-2build4",
"evidence": "/affected/1/versions"
},
{
"value": "2.1.1-2build5",
"evidence": "/affected/1/versions"
},
{
"value": "2.1.1-2.1",
"evidence": "/affected/1/versions"
},
{
"value": "3.1.0-3",
"evidence": "/affected/1/versions"
},
{
"value": "3.1.0-4",
"evidence": "/affected/1/versions"
},
{
"value": "3.1.1-1",
"evidence": "/affected/1/versions"
},
{
"value": "3.1.1-1build1",
"evidence": "/affected/1/versions"
}
]
},
{
"name": {
"value": "pycares",
"evidence": "/affected/2/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "3.1.1-1build3",
"evidence": "/affected/2/versions"
},
{
"value": "3.1.1-1build5",
"evidence": "/affected/2/versions"
},
{
"value": "4.1.2-2",
"evidence": "/affected/2/versions"
},
{
"value": "4.1.2-2build1",
"evidence": "/affected/2/versions"
}
]
},
{
"name": {
"value": "pycares",
"evidence": "/affected/3/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "4.3.0-2",
"evidence": "/affected/3/versions"
},
{
"value": "4.3.0-2build1",
"evidence": "/affected/3/versions"
},
{
"value": "4.4.0-1",
"evidence": "/affected/3/versions"
},
{
"value": "4.4.0-1build1",
"evidence": "/affected/3/versions"
},
{
"value": "4.4.0-1build2",
"evidence": "/affected/3/versions"
}
]
},
{
"name": {
"value": "pycares",
"evidence": "/affected/4/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "4.4.0-2build2",
"evidence": "/affected/4/versions"
}
]
},
{
"name": {
"value": "pycares",
"evidence": "/affected/5/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "5.0.1-3",
"evidence": "/affected/5/versions"
}
]
},
{
"name": {
"value": "pycares",
"evidence": "/affected/6/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "4.4.0-2build2",
"evidence": "/affected/6/versions"
},
{
"value": "4.4.0-2build3",
"evidence": "/affected/6/versions"
},
{
"value": "4.9.0-1",
"evidence": "/affected/6/versions"
},
{
"value": "5.0.0-2",
"evidence": "/affected/6/versions"
},
{
"value": "5.0.1-2",
"evidence": "/affected/6/versions"
},
{
"value": "5.0.1-3",
"evidence": "/affected/6/versions"
}
]
}
],
"severity": "high",
"structured": {
"id": "UBUNTU-CVE-2025-48945",
"aliases": [
"UBUNTU-CVE-2025-48945"
],
"metrics": [
{
"type": "CVSS_V4",
"score": "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N"
},
{
"type": "Ubuntu",
"score": "medium"
}
],
"affected": [
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "pycares",
"purl": "pkg:deb/ubuntu/pycares?arch=source&distro=bionic",
"ecosystem": "Ubuntu:18.04:LTS"
},
"versions": [
"2.1.1-2build2"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2025/UBUNTU-CVE-2025-48945.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "python-pycares",
"binary_version": "2.1.1-2build2"
},
{
"binary_name": "python3-pycares",
"binary_version": "2.1.1-2build2"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "pycares",
"purl": "pkg:deb/ubuntu/pycares?arch=source&distro=focal",
"ecosystem": "Ubuntu:20.04:LTS"
},
"versions": [
"2.1.1-2build4",
"2.1.1-2build5",
"2.1.1-2.1",
"3.1.0-3",
"3.1.0-4",
"3.1.1-1",
"3.1.1-1build1"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2025/UBUNTU-CVE-2025-48945.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "python3-pycares",
"binary_version": "3.1.1-1build1"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "pycares",
"purl": "pkg:deb/ubuntu/pycares?arch=source&distro=jammy",
"ecosystem": "Ubuntu:22.04:LTS"
},
"versions": [
"3.1.1-1build3",
"3.1.1-1build5",
"4.1.2-2",
"4.1.2-2build1"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2025/UBUNTU-CVE-2025-48945.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "python3-pycares",
"binary_version": "4.1.2-2build1"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "pycares",
"purl": "pkg:deb/ubuntu/pycares?arch=source&distro=noble",
"ecosystem": "Ubuntu:24.04:LTS"
},
"versions": [
"4.3.0-2",
"4.3.0-2build1",
"4.4.0-1",
"4.4.0-1build1",
"4.4.0-1build2"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2025/UBUNTU-CVE-2025-48945.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "python3-pycares",
"binary_version": "4.4.0-1build2"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "pycares",
"purl": "pkg:deb/ubuntu/pycares?arch=source&distro=questing",
"ecosystem": "Ubuntu:25.10"
},
"versions": [
"4.4.0-2build2"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2025/UBUNTU-CVE-2025-48945.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "python3-pycares",
"binary_version": "4.4.0-2build2"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "pycares",
"purl": "pkg:deb/ubuntu/pycares?arch=source&distro=stonking",
"ecosystem": "Ubuntu:26.10"
},
"versions": [
"5.0.1-3"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2025/UBUNTU-CVE-2025-48945.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "python3-pycares",
"binary_version": "5.0.1-3"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "pycares",
"purl": "pkg:deb/ubuntu/pycares?arch=source&distro=resolute",
"ecosystem": "Ubuntu:26.04:LTS"
},
"versions": [
"4.4.0-2build2",
"4.4.0-2build3",
"4.9.0-1",
"5.0.0-2",
"5.0.1-2",
"5.0.1-3"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2025/UBUNTU-CVE-2025-48945.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "python3-pycares",
"binary_version": "5.0.1-3"
}
]
}
}
],
"modified": "2026-10-17T12:57:03.932219372Z",
"provider": "osv",
"upstream": [
"CVE-2025-48945"
],
"references": [
"https://ubuntu.com/security/CVE-2025-48945",
"https://www.cve.org/CVERecord?id=CVE-2025-48945",
"https://github.com/saghul/pycares/security/advisories/GHSA-5qpg-rh4j-qp35"
]
},
"related_cves": [
{
"value": "CVE-2025-48945",
"evidence": "/upstream"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 356687,
"published_at": "2025-06-20T20:15:00+00:00"
}