CVE-2024-12254

Unbounded memory buffering in SelectorSocketTransport.writelines()

HIGH
7.5
CVSS Score
Published: December 6, 2024 at 03:19 PM UTC
Updated: July 31, 2026 at 03:30 PM UTC
1 product affected across 1 vendorPython

Using CPython by Python Software Foundation?

Get instant alerts when new vulnerabilities affect CPython - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
HIGH7.5
Exploit prediction
EPSS 2%
SSVC
No known exploit

Description

Starting in Python 3.12.0, the asyncio._SelectorSocketTransport.writelines() method would not "pause" writing and signal to the Protocol to drain the buffer to the wire once the write buffer reached the "high-water mark". Because of this, Protocols would not periodically drain the write buffer potentially leading to memory exhaustion. This vulnerability likely impacts a small number of users, you must be using Python 3.12.0 or later, on macOS or Linux, using the asyncio module with protocols, and using .writelines() method which had new zero-copy-on-write behavior in Python 3.12.0 and later. If not all of these factors are true then your usage of Python is unaffected.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v < 3.12.93.12.0 ≤ v < 3.14.0a13.13.0 ≤ v < 3.13.23.14.0a1 ≤ v < 3.14.0a33.12.03.13.03.14.0a1
Affected range stops below 3.12.9, so it looks safe — our inference, not a vendor statement
Affected range stops below 3.13.2, so it looks safe — our inference, not a vendor statement
Affected range stops below 3.14.0a1, so it looks safe — our inference, not a vendor statement
Affected range stops below 3.14.0a3, so it looks safe — our inference, not a vendor statement

SSVC — Action Prioritization

SSVCNo known exploitAutomatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

7.5HIGHCISA-ADP
Attack Vector
NETWORK
Complexity
LOW
Privileges
NONE
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Vector?

Quick Info

StatusDEFERRED
CWE
CWE-400CWE-770

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card