CVE-2025-48945pycares has a Use-After-Free Vulnerability
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.
What to do
Fixed builds are available from Debian, PyPI: see the table below for the fixed version per release.
Debian, Ubuntu have not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.10 | pycares | Fix pending | UBUNTU-CVE-2025-48945 | |
| Ubuntu 26.04 | pycares | Under investigation | UBUNTU-CVE-2025-48945 | |
| Ubuntu 25.10 | pycares | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2025-48945 | |
| Ubuntu 24.04 | pycares | Under investigation | UBUNTU-CVE-2025-48945 | |
| Ubuntu 22.04 | pycares | Under investigation | UBUNTU-CVE-2025-48945 | |
| Ubuntu 20.04 | pycares | Fix pending | UBUNTU-CVE-2025-48945 | |
| Ubuntu 18.04 | pycares | Fix pending | UBUNTU-CVE-2025-48945 | |
| Debian 14 | pycares | Fixed | 4.9.0-1 | DEBIAN-CVE-2025-48945 |
| Debian 13 | pycares | Fix pending | DEBIAN-CVE-2025-48945 | |
| Debian 12 | pycares | Fix pending | DEBIAN-CVE-2025-48945 | |
| PyPI library | pycares | Fixed | 4.9.0 | GHSA-5qpg-rh4j-qp35 |
What the vendor says
As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- aio-libs aiodns: affected: < 4.9.0
References
- https://github.com/saghul/pycares/security/advisories/GHSA-5qpg-rh4j-qp35
- https://github.com/saghul/pycares/security/advisories/GHSA-5qpg-rh4j-qp35
- https://github.com/aio-libs/aiodns/commit/f259a6e3650555157af53ac2b39f2ff545321d55
- https://github.com/saghul/pycares/commit/ebfd7d71eb8e74bc1057a361ea79a5906db510d4
- https://github.com/aio-libs/aiodns/releases/tag/v3.5.0
- https://github.com/saghul/pycares/releases/tag/v4.9.0
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.