CVE-2025-48945 Details
Description
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.
A use-after-free vulnerability has been identified in the pycares Python module, which interfaces with the c-ares library for asynchronous DNS requests. This vulnerability exists in pycares versions prior to 4.9.0 and arises when a Channel object is garbage collected while DNS queries are still pending. The issue leads to a fatal error in Python and crashes the interpreter. The vulnerability is more likely to occur when 'event_thread' is enabled, but can also happen under certain conditions without it.
Upgrade to pycares version 4.9.0 or later, which includes a fix for this vulnerability. After upgrading, it is recommended to explicitly close Channel objects when they are no longer needed, or to use them as context managers, which automatically handle closure.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Jun 20, 2025CISA-ADP
Assessed Jun 20, 2025References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/aio-libs/aiodns/commit/f259a6e3650555157af53ac2b39f2ff545321d55 | [email protected] | Source CodeVendor |
| https://github.com/aio-libs/aiodns/releases/tag/v3.5.0 | [email protected] | Release NotesVendor |
| https://github.com/saghul/pycares/commit/ebfd7d71eb8e74bc1057a361ea79a5906db510d4 | [email protected] | Source CodeVendor |
| https://github.com/saghul/pycares/releases/tag/v4.9.0 | [email protected] | Release NotesVendor |
| https://github.com/saghul/pycares/security/advisories/GHSA-5qpg-rh4j-qp35 | [email protected] | AdvisoryRemedyVendor |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-416 | Use After Free | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| saghul pycares | All versions |
CPE
Remediation
| |
| aio-libs aiodns | All versions |
CPE
Remediation
| |
Change History
3 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Jun 20, 2025 | New CVE Received | [email protected] |
Volerion