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
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| aio-libs | aiodns | < 4.9.0 | — |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | pycares | 4.9.0-1 | — |
| Debian 13 | pycares | No fix yet | — |
| Debian 12 | pycares | No fix yet | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.10 | pycares | No fix yet | — |
| Ubuntu 26.04 LTS | pycares | No fix yet | — |
| Ubuntu 25.10 | pycares | No fix yet | — |
| Ubuntu 24.04 LTS | pycares | No fix yet | — |
| Ubuntu 22.04 LTS | pycares | No fix yet | — |
Show 2 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 20.04 LTS | pycares | No fix yet | — |
| Ubuntu 18.04 LTS | pycares | No fix yet | — |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES 15 SP5 | python-pycares | 4.10.0-150400.9.8.1 | SUSE-SU-2025:03354-1 |
| SLES 15 SP4 | python-pycares | 4.10.0-150400.9.8.1 | SUSE-SU-2025:03354-1 |
| SLES 3 | python-pycares | 4.10.0-150400.9.8.1 | SUSE-SU-2025:03354-1 |
Show 4 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES for SAP 15 SP5 | python-pycares | 4.10.0-150400.9.8.1 | SUSE-SU-2025:03354-1 |
| SLES for SAP 15 SP4 | python-pycares | 4.10.0-150400.9.8.1 | SUSE-SU-2025:03354-1 |
| SLE HPC 15 SP5 | python-pycares | 4.10.0-150400.9.8.1 | SUSE-SU-2025:03354-1 |
| SLE HPC 15 SP4 | python-pycares | 4.10.0-150400.9.8.1 | SUSE-SU-2025:03354-1 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | python-pycares | 4.9.0-1.1 | openSUSE-SU-2025:15324-1 |
| openSUSE Leap 15.6 | python-pycares | 4.10.0-150400.9.8.1 | SUSE-SU-2025:03354-1 |
Azure Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Azure Linux 3 | python3-pycares | No fix yet | — |
| Azure Linux 2 (CBL-Mariner) | python-pycares | No fix yet | — |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| PyPI | pycares | < 4.9.0 | 4.9.0 | GHSA-5qpg-rh4j-qp35 |
Advisories 2
- openSUSE-SU-2025:15324-1 python311-pycares-4.9.0-1.1 on GA media SUSE / openSUSE Security Updates · Mar 23, 2026
- SUSE-SU-2025:03354-1 Security update for python-pycares SUSE / openSUSE Security Updates · Mar 23, 2026
References
- 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