Skip to main content

CPython CVE-2026-3298

| EUVDEUVD-2026-24136 HIGH
Out-of-bounds Write (CWE-787)
2026-04-21 PSF GHSA-3p9c-22jr-wq4x
8.8
CVSS 4.0 · Vendor: PSF
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Send oversized UDP/TCP packet
  2. Delivery
    Trigger sock_recvfrom_into() with insufficient buffer
  3. Exploit
    Overflow writes attacker data beyond bounds
  4. Execution
    Corrupt heap metadata or function pointers
  5. Persist
    Redirect execution flow
  6. Impact
    Execute arbitrary code as Python process

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Bounds checking, write limits
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.

Exploitation Conditions

Windows operating system required - Linux, macOS, and Unix platforms are not vulnerable due to different asyncio event loop implementations. Application code must explicitly use asyncio.ProactorEventLoop (Windows default since Python 3.8) AND call the sock_recvfrom_into() method with the nbytes parameter AND accept network data from untrusted sources. Most Python web frameworks (Django, Flask, FastAPI) do not directly expose this low-level asyncio API, limiting exposure to custom network protocol implementations. Exploitation success further constrained by: process memory layout (requires predictable heap structure), Windows ASLR configuration (randomizes memory addresses), and DEP/NX protections (prevent direct shellcode execution from data regions). These system-level mitigations increase attack complexity beyond the CVSS AC:L rating, though a determined attacker with multiple attempts could overcome ASLR through information leaks or heap spraying techniques.

Impact

Real-world risk is moderate despite the 8.8 CVSS score due to significant exploitation constraints. CVSS vector (AV:N/AC:L/PR:N/UI:N) indicates network-accessible attack requiring no authentication, but impact is tempered by multiple factors: (1) Windows-only - eliminates Linux/Unix server deployments which dominate Python backend infrastructure, (2) Requires application code specifically using asyncio.ProactorEventLoop.sock_recvfrom_into() with the nbytes parameter - not a default code path in common frameworks, (3) Exploitation complexity depends on memory layout and ASLR/DEP mitigations in modern Windows, reducing reliable code execution scenarios. No EPSS score, KEV status, or POC availability data provided - absence of active exploitation indicators suggests this is a code-quality fix rather than an observed attack vector. SSVC assessment: exploitation status unknown, not automatable (requires specific API usage pattern), technical impact potentially high (memory corruption) but mitigated by platform and deployment constraints. Priority for organizations running Python network services on Windows with custom asyncio implementations; lower priority for typical Linux-hosted web applications.

Exploit ScenarioDerived

An attacker sends a specially crafted network packet to a Windows-hosted Python application using asyncio.ProactorEventLoop for asynchronous socket operations. The application calls sock_recvfrom_into() with a fixed-size buffer but the incoming data exceeds this allocation. Without boundary validation, the method writes attacker-controlled payload beyond the buffer bounds, corrupting adjacent heap memory structures. Depending on memory layout, this could overwrite function pointers, vtable entries, or other critical data structures, potentially leading to control-flow hijacking and arbitrary code execution with the privileges of the Python process.

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 – Apr 21, 2026

Out-of-bounds buffer write in CPython's asyncio.ProactorEventLoop (Windows only) allows remote attackers to trigger memory corruption via oversized network data. The sock_recvfrom_into() method lacks buffer size validation when the nbytes parameter is used, enabling writes beyond allocated memory boundaries. Patch available via GitHub PR #148809. CVSS 8.8 reflects network-accessible attack surface with no authentication required, though exploitation is platform-specific (Windows only) and requires specific asyncio usage patterns.

RemediationAI

Upgrade to the patched CPython version incorporating fix from GitHub pull request #148809 (https://github.com/python/cpython/pull/148809). Specific patched version number not confirmed in available data - consult the Python Security Announce mailing list thread at https://mail.python.org/archives/list/security-announce@python.org/thread/KWTPIQBOOOUNQP7UFSLBI437NJDFLA3F/ for exact release versions. If immediate patching is not feasible, implement compensating controls: (1) Audit application code for direct usage of sock_recvfrom_into() with nbytes parameter and add explicit buffer size validation before calls, (2) Deploy on Linux/Unix platforms where ProactorEventLoop is not used, eliminating exposure, (3) Enable Windows DEP (Data Execution Prevention) and ASLR system-wide to increase exploitation difficulty, though these do not eliminate the vulnerability. Note that moving to selector-based event loops (SelectorEventLoop) on Windows will change performance characteristics for high-concurrency applications. Code-level workaround trades developer effort for deployment flexibility; platform migration trades Windows-specific features for immediate risk elimination.

Affected VersionsENISA

CPython 3.11.0 <3.15.0

Affected Packages

euvd cpython fix: 3.15.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

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

Technical ContextAI · show details

This vulnerability affects CPython's asyncio module, specifically the ProactorEventLoop implementation used exclusively on Windows platforms. The ProactorEventLoop uses Windows I/O Completion Ports (IOCP) for asynchronous I/O operations, unlike Unix-based systems which use selector-based event loops. The sock_recvfrom_into() method implements zero-copy network data reception by writing directly into a caller-provided buffer. CWE-787 (Out-of-bounds Write) occurs when the method fails to validate that incoming network data does not exceed the destination buffer size specified by the nbytes parameter. This is a classic buffer overflow vulnerability where the bounds check was omitted in the data copy operation, allowing adjacent memory regions to be overwritten with attacker-controlled network payload data.

Know when Cpython 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

Vendor (PSF) PRIMARY 8.8 HIGH
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (PSF) · only source for this CVE.

CVSS VectorVendor: PSF

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

Lifecycle Timeline

3
CVSS changed
Apr 21, 2026 - 15:22 NVD
8.8 (HIGH)
Patch released
Apr 21, 2026 - 15:00 nvd
Patch available
CVE Published
Apr 21, 2026 - 14:45 nvd
HIGH 8.8

DescriptionCVE.org

The method "sock_recvfrom_into()" of "asyncio.ProacterEventLoop" (Windows only) was missing a boundary check for the data buffer when using nbytes parameter. This allowed for an out-of-bounds buffer write if data was larger than the buffer size. Non-Windows platforms are not affected.

Executive ViewAI

Why It Matters

CVE-2026-3298 is a memory corruption vulnerability in CPython's asyncio library on Windows that allows unauthenticated remote attackers to crash applications or execute code by sending oversized network data to vulnerable event loop implementations. Organizations running Python asyncio-based services on Windows should prioritize patching to prevent denial-of-service and potential code execution attacks.

Business Impact: High
Compensating Controls

Apply vendor patch. Interim mitigation if patching is delayed: restrict network access to asyncio services using Windows firewall rules; disable ProactorEventLoop usage where possible and substitute SelectorEventLoop; implement input validation at application layer to reject oversized network payloads before asyncio processing.

Threat Intelligence Overview

EPSS Score
0.1%
Top 84% exploitable
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GitHub VulDB

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
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Partial

Priority Score

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

Attack Technique

A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.

Memory corruption occurs when a program writes data beyond the boundaries of allocated memory regions or accesses memory in unintended ways, violating the integrity of the process's address space.

CVE-2026-17084 MEDIUM POC
6.0 Aug 18

Integrity bypass in CPython's stringprep module causes divergent domain name normalization when processing international

CVE-2026-19445 CRITICAL
9.2 Sep 30

A use-after-free in CPython's ssl module lets a remote, unauthenticated TLS client crash a Python TLS server process - o

CVE-2026-6100 CRITICAL
9.1 Apr 13

CPython decompression modules (lzma, bz2, gzip) allow memory corruption via use-after-free when decompressor instances a

CVE-2026-11972 HIGH
8.2 Jun 23

Denial of service in CPython's tarfile module allows remote attackers to trigger an infinite loop by supplying a crafted

CVE-2026-9669 HIGH
8.2 Jun 08

Stack-based buffer overflow in CPython's bz2.BZ2Decompressor allows remote attackers to crash Python applications by sen

CVE-2026-11940 HIGH
7.8 Jun 23

Path traversal in CPython's tarfile module allows a crafted tar archive to bypass the 'data' and 'tar' extraction filter

CVE-2026-19553 HIGH
7.6 Sep 30

Certificate hostname verification is silently skipped in CPython's TLS stack when an application enables SSLContext.chec

CVE-2026-4786 HIGH
7.0 Apr 13

Command injection in CPython's webbrowser.open() API bypasses previous CVE-2026-4519 mitigation via specially crafted UR

CVE-2026-4519 HIGH
7.0 Mar 20

The webbrowser.open() API in CPython accepts URLs with leading dashes, which certain web browsers interpret as command-l

CVE-2026-7774 MEDIUM
6.9 Jun 04

Path traversal in CPython's tarfile module allows malicious tar archives to bypass the data_filter safety mechanism and

CVE-2026-19672 MEDIUM
6.3 Aug 19

CPython's tarfile module on POSIX platforms creates empty directories outside the intended extraction destination when p

CVE-2026-7210 MEDIUM
6.3 May 11

XML parsers in CPython's xml.parsers.expat and xml.etree.ElementTree modules use insufficient entropy for Expat hash-flo

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