pycares has a Use-After-Free Vulnerability
Published Jun 20, 2025
8.2
HIGHCVSS 4.0
EPSS 0.48%
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.
Affected products
-
Affected
- < 4.9.0
No data.
No data.
Red Hat Ansible Automation Platform 2
automation-controller
Not affected
Red Hat Ansible Automation Platform 2
python-pycares
Not affected
Red Hat Ansible Automation Platform 2
python3.11-pycares
Not affected
Red Hat Ansible Automation Platform 2
python3x-pycares
Not affected
Red Hat Satellite 6
python-pycares
Not affected
Red Hat Satellite 6
satellite-capsule:el8/python-pycares
Not affected
Red Hat Satellite 6
satellite:el8/python-pycares
Not affected
Red Hat Update Infrastructure 4 for Cloud Providers
python-pycares
Not affected
| Product | Package | State | Advisory |
|---|---|---|---|
| Red Hat Ansible Automation Platform 2 | automation-controller | Not affected | n/a |
| Red Hat Ansible Automation Platform 2 | python-pycares | Not affected | n/a |
| Red Hat Ansible Automation Platform 2 | python3.11-pycares | Not affected | n/a |
| Red Hat Ansible Automation Platform 2 | python3x-pycares | Not affected | n/a |
| Red Hat Satellite 6 | python-pycares | Not affected | n/a |
| Red Hat Satellite 6 | satellite-capsule:el8/python-pycares | Not affected | n/a |
| Red Hat Satellite 6 | satellite:el8/python-pycares | Not affected | n/a |
| Red Hat Update Infrastructure 4 for Cloud Providers | python-pycares | Not affected | n/a |
No package ranges for this CVE.
Remediation
Red Hat mitigation
To mitigate this flaw avoid creating Channel objects per-request.
References (11)
- https://access.redhat.com/security/cve/CVE-2025-48945 Vendor Advisory
- https://bugzilla.redhat.com/show_bug.cgi?id=2373046 Issue Tracking
- https://euvd.enisa.europa.eu/vulnerability/EUVD-2025-28273 Advisory
- https://github.com/aio-libs/aiodns/commit/f259a6e3650555157af53ac2b39f2ff545321d55 x_refsource_MISC
- https://github.com/aio-libs/aiodns/releases/tag/v3.5.0 x_refsource_MISC
- https://github.com/saghul/pycares
- https://github.com/saghul/pycares/commit/ebfd7d71eb8e74bc1057a361ea79a5906db510d4 x_refsource_MISC
- https://github.com/saghul/pycares/releases/tag/v4.9.0 x_refsource_MISC
- https://github.com/saghul/pycares/security/advisories/GHSA-5qpg-rh4j-qp35 x_refsource_CONFIRM
- https://nvd.nist.gov/vuln/detail/CVE-2025-48945
- https://www.cve.org/CVERecord?id=CVE-2025-48945
Change history (0)
No recorded changes yet.
CVE.org / MITRE
CISA Vulnrichment
GitHub
No data