# CVE-2025-48945: pycares has a Use-After-Free Vulnerability

- Severity: High 8.2 (CVSS:4.0, scored by GitHub_M) `CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.51%, higher than 44% of CVEs (2026-12-01)
- Published: 2025-06-16T16:09:47.000Z
- Modified: 2026-09-10T03:50:24.913Z
- Also known as: GHSA-5qpg-rh4j-qp35
- Weaknesses: CWE-416
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- aio-libs aiodns: < 4.9.0
- pycares (PyPI): before 4.9.0

## Every score

- GitHub_M: CVSS:4.0 8.2 High `CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N`
- GitHub: rating Medium

## References

- <https://github.com/saghul/pycares/security/advisories/GHSA-5qpg-rh4j-qp35> (web)
- <https://github.com/aio-libs/aiodns/commit/f259a6e3650555157af53ac2b39f2ff545321d55>
- <https://github.com/saghul/pycares/commit/ebfd7d71eb8e74bc1057a361ea79a5906db510d4> (web)
- <https://github.com/aio-libs/aiodns/releases/tag/v3.5.0>
- <https://github.com/saghul/pycares/releases/tag/v4.9.0>
- <https://github.com/saghul/pycares> (package)

## Sources

- CVE List: [CVE-2025-48945](https://www.cve.org/CVERecord?id=CVE-2025-48945), CVE Terms of Use, modified 2025-06-20
- GitHub Advisory Database: [GHSA-5qpg-rh4j-qp35](https://github.com/advisories/GHSA-5qpg-rh4j-qp35), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2025-48945](https://nvd.nist.gov/vuln/detail/CVE-2025-48945), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2025-48945 · Whole record: https://cve.day/CVE-2025-48945.json · Rebuilt by cve.day 2026-11-25T22:58:59.477Z
