Skip to main content

Python CVE-2025-48945

| EUVDEUVD-2025-28273 HIGH
Use After Free (CWE-416)
2025-06-20 security-advisories@github.com GHSA-5qpg-rh4j-qp35
8.2
CVSS 4.0 · GitHub Advisory
View

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A06:2021 - Vulnerable and Outdated Components
ASVS 5.0
V15 - Secure Coding and Architecture Memory lifecycle management
MITRE ATT&CK

2 techniques across 2 tactics: Execution, Privilege Escalation

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Impact

CVSS 8.2 indicates high severity, with Network attack vector (AV:N), Low attack complexity (AC:L), and Availability impact (VA:H), but zero Impact on Confidentiality or Integrity. However, real-world exploitability is constrained: (1) Attack Timing (AT:P) indicates partial/conditional triggering—attacker cannot reliably force Python garbage collection or DNS query timing; (2) No KEV/active exploitation data suggests low current threat; (3) No public POC availability further reduces practical risk; (4) EPSS data not provided but likely moderate (0.5-0.7 range given DoS-only impact and timing dependency). SSVC assessment: Exploitation is Unproven (no public POC), not Automatable (requires application-specific DNS patterns + GC timing), and Safety Impact is Controlled (interpreter crash, not data exfiltration). Priority should be Medium-to-High for applications with strict availability SLAs or untrusted DNS input; lower for internal/trusted workloads. This is a high-CVSS-but-moderate-real-risk issue.

Exploit ScenarioDerived

An attacker or malicious application creates a pycares Channel object, initiates multiple asynchronous DNS queries (e.g., resolve many domains), then allows the Channel object to go out of scope without explicit cleanup. Python's garbage collector deallocates the Channel, triggering premature c-ares library cleanup. If DNS query callbacks are still in-flight, they dereference freed memory, causing a fatal Python interpreter crash. In a multi-tenant scenario (e.g., shared hosting, containerized service), an attacker could trigger this via a specially-timed DNS resolution request, causing denial-of-service to co-hosted workloads. Exploitability is Low-to-Moderate: requires precise timing (garbage collection + callback concurrency), no remote code execution, and visibility into application DNS patterns. No public POC exists, suggesting low current threat actor awareness.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.1% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Mar 15, 2026

pycares versions prior to 4.9.0 contain a use-after-free vulnerability (CWE-416) in the Channel object that crashes the Python interpreter when garbage collection occurs during pending DNS queries. This denial-of-service vulnerability affects any application using pycares for asynchronous DNS resolution; attackers can trigger interpreter crashes by manipulating DNS query timing, though no active exploitation or public POC is documented. The CVSS 8.2 score reflects high availability impact, but real-world exploitability is limited by the requirement for application-level DNS query patterns and Python garbage collection timing.

RemediationAI

Upgrade pycares to version 4.9.0 or later; details: Applies safe channel destruction mechanism that ensures pending queries complete or are cancelled before memory release; verification: pip show pycares | grep Version (confirm 4.9.0+) Workaround (Temporary): Explicit Channel cleanup before application exit or scope end; details: Manually call channel.close() or use context managers to ensure Channel lifecycle is explicit; avoids reliance on Python garbage collection timing; code_example: with Channel() as ch: query(ch)

ensures cleanup

Mitigation: Monitor DNS query patterns and Python process stability; details: Implement health checks; if using pycares pre-4.9.0, track correlated interpreter crashes with DNS query bursts

Affected VersionsENISA

aiodns < 4.9.0

Affected Packages

pypi pycares fix: 4.9.0
euvd aiodns fix: 4.9.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in pypi, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

pycares is a Python binding (CPE: pycares) that wraps c-ares (a C library for asynchronous DNS name resolution per RFC 1035). The vulnerability exists in the Channel class, which manages DNS queries asynchronously. When a Channel object is garbage collected while DNS queries remain pending, the underlying c-ares library structures are freed, but active query callbacks may still reference this freed memory—a classic use-after-free condition (CWE-416: Use After Free). This occurs at the memory safety boundary between Python's garbage-collected heap and c-ares' manually-managed C memory, where Python's reference counting may release the Channel before c-ares completes query cleanup. The fix in v4.9.0 implements safe channel destruction logic to ensure pending queries complete or are properly cancelled before memory is released.

Know when Python gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

GitHub Advisory PRIMARY 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
Ubuntu MEDIUM
SUSE 5.9 MEDIUM
AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:L/A:H
Red Hat 5.5 MEDIUM

Primary rating from GitHub Advisory.

CVSS VectorGitHub Advisory

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
Patch released
Mar 31, 2026 - 21:13 nvd
Patch available
CVE Published
Jun 20, 2025 - 20:15 nvd
HIGH 8.2

DescriptionGitHub Advisory

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.

Executive ViewAI

Why It Matters

A use-after-free vulnerability in pycares can cause Python interpreter crashes when DNS queries are improperly cleaned up, potentially disrupting services that depend on DNS resolution. Any organization running applications built with pycares versions prior to 4.9.0 faces risk of denial of service through unexpected application failures.

Business Impact: Medium
Compensating Controls

Implement application-level monitoring to detect unexpected Python interpreter crashes; configure automated restart mechanisms for affected services; consider network-level DNS caching to reduce direct pycares query load; isolate affected applications to limit blast radius of potential crashes until patching is complete.

Threat Intelligence Overview

EPSS Score
0.1%
Top 70% exploitable
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.1%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
Medium

Priority Score

41
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +41
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Use-after-free vulnerabilities occur when a program continues to access memory through a pointer after that memory has been deallocated.

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

More in Python

View all
CVE-2025-24016 CRITICAL POC
9.9 Feb 10

Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t

CVE-2025-27520 CRITICAL POC
9.8 Apr 04

BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser

CVE-2025-2945 CRITICAL POC
9.9 Apr 03

pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi

CVE-2013-5093 MEDIUM POC
6.8 Sep 27

The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python

CVE-2025-32375 CRITICAL POC
9.8 Apr 09

BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica

CVE-2014-0224 HIGH POC
7.4 Jun 05

OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph

CVE-2024-21644 HIGH POC
7.5 Jan 08

pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.

CVE-2026-33017 CRITICAL POC
9.3 Mar 17

Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301

CVE-2017-9462 HIGH POC
8.8 Jun 06

In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse

CVE-2026-49869 CRITICAL POC
10.0 Jun 26

Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to

CVE-2026-39987 CRITICAL POC
9.3 Apr 08

Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/

CVE-2024-21645 MEDIUM POC
5.3 Jan 08

pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne

Vendor StatusVendor

Ubuntu

Priority: Medium
pycares
Release Status Version
bionic needs-triage -
focal needs-triage -
jammy needs-triage -
noble needs-triage -
upstream needs-triage -
plucky ignored end of life, was needs-triage
oracular ignored end of life, was needs-triage
questing needs-triage -

Debian

Bug #1109377
pycares
Release Status Fixed Version Urgency
bullseye vulnerable 3.1.1-1 -
bookworm vulnerable 4.3.0-2 -
trixie vulnerable 4.4.0-2 -
forky, sid fixed 5.0.1-3 -
(unstable) fixed 4.9.0-1 -

SUSE

Severity: Medium
Product Status
SUSE Linux Enterprise Desktop 15 SP6 SUSE Linux Enterprise High Performance Computing 15 SP6 SUSE Linux Enterprise Module for Python 3 15 SP6 SUSE Linux Enterprise Server 15 SP6 SUSE Linux Enterprise Server for SAP Applications 15 SP6 Fixed
SUSE Linux Enterprise Desktop 15 SP7 SUSE Linux Enterprise High Performance Computing 15 SP7 SUSE Linux Enterprise Module for Python 3 15 SP7 SUSE Linux Enterprise Server 15 SP7 SUSE Linux Enterprise Server for SAP Applications 15 SP7 Fixed
SUSE Linux Enterprise High Performance Computing 15 SP4-ESPOS Fixed
SUSE Linux Enterprise High Performance Computing 15 SP4-LTSS Fixed
SUSE Linux Enterprise High Performance Computing 15 SP5-ESPOS Fixed

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy