CVE-2025-48945 pycares has a Use-After-Free Vulnerability
An attacker can cause a denial of service by triggering a use-after-free error in pycares when a channel is garbage collected during pending DNS queries.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2025-48945?
CVE-2025-48945 is a high-severity use after free vulnerability in aio-libs aiodns, published on 20 Jun 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official 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.
Weakness: CWE-416
Which versions are affected by CVE-2025-48945?
2 open source packages ship an affected version, including pycares.
| Package | Affected | Fixed in |
|---|---|---|
pycares PyPI | All versions | 4.9.0 |
pycares PyPI | All versions | 4.9.0 |
Linux distribution packages (12)
python-pycares SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS | All versions | 4.10.0-150400.9.8.1 |
python-pycares SUSE:Linux Enterprise High Performance Computing 15 SP4-LTSS | All versions | 4.10.0-150400.9.8.1 |
python-pycares SUSE:Linux Enterprise High Performance Computing 15 SP5-ESPOS | All versions | 4.10.0-150400.9.8.1 |
python-pycares SUSE:Linux Enterprise High Performance Computing 15 SP5-LTSS | All versions | 4.10.0-150400.9.8.1 |
python-pycares SUSE:Linux Enterprise Module for Python 3 15 SP6 | All versions | 4.10.0-150400.9.8.1 |
python-pycares SUSE:Linux Enterprise Module for Python 3 15 SP7 | All versions | 4.10.0-150400.9.8.1 |
python-pycares SUSE:Linux Enterprise Server 15 SP4-LTSS | All versions | 4.10.0-150400.9.8.1 |
python-pycares SUSE:Linux Enterprise Server 15 SP5-LTSS | All versions | 4.10.0-150400.9.8.1 |
python-pycares SUSE:Linux Enterprise Server for SAP Applications 15 SP4 | All versions | 4.10.0-150400.9.8.1 |
python-pycares SUSE:Linux Enterprise Server for SAP Applications 15 SP5 | All versions | 4.10.0-150400.9.8.1 |
python-pycares openSUSE:Leap 15.6 | All versions | 4.10.0-150400.9.8.1 |
python-pycares openSUSE:Tumbleweed | All versions | 4.9.0-1.1 |
How do I fix CVE-2025-48945?
Upgrade pycares to 4.9.0 or later.
Upgrade to the fixed version. These bugs are found with fuzzing and sanitisers and avoided by memory-safe languages. More about Use after free.
Is CVE-2025-48945 being exploited?
There is no known exploitation of CVE-2025-48945 in the wild and no public exploit code.
Sources
Also known as AZL-64307, AZL-67074, DEBIAN-CVE-2025-48945, GHSA-5qpg-rh4j-qp35, OESA-2025-1810, OESA-2025-1811 and 6 more.