CVE-2024-12254: Unbounded memory buffering in SelectorSocketTransport.writelines()
Vulnerability summary
CVE-2024-12254 is a high (CVSS 8.7) Uncontrolled Resource Consumption vulnerability in python software foundation cpython. EPSS estimates a 1.87% chance of exploitation in the next 30 days, higher than 80% of scored vulnerabilities.
Severe, CVSS 8.7 (CVE.org); no exploitation reported by the 5 checked sources; EPSS 2% (FIRST, 04-12-2026)
Source freshness unavailable
How is this decided?Advisory lineage
Upstream 0 · Downstream 6 · Related 3Timeline
- 06-12-2024PublishedVulnerability first disclosed.
- 31-07-2026Last modifiedVulnerability information updated.
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.
CVSS metrics
10 scores · 7 sources · 2 versions- OSV · AlpineEcosystem advisory · calculated8.7HighCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
- OSV · UbuntuEcosystem advisory · calculated8.7HighCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
- OSV · DebianEcosystem advisory · calculated8.7HighCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
- OSV · WolfiEcosystem advisory · calculated8.7HighCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
- OSV · ChainguardEcosystem advisory · calculated8.7HighCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
- NVDNIST8.7HighCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
- OSV · UbuntuEcosystem advisory · calculated7.5HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- NVDNIST7.5HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
EPSS trend
Probability
1.87%
Chance of exploitation in the next 30 days
Percentile
80%
Versus all other CVEs
30-day change
No change 0.00 pp
From 1.87% on 04-11-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root cause- CWE-400Uncontrolled Resource ConsumptionThe product does not properly control the allocation and maintenance of a limited resource.
- CWE-770Allocation of Resources Without Limits or ThrottlingThe product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated.
Affected systems
Known conditions: network-reachable, no authentication, no user interaction (CVSS vector). Other conditions: not stated in public data.
Opensuse6 products
- python-aiohttp&distro=openSUSE Tumbleweed< 3.11.16-1.1
- python312-core&distro=openSUSE Leap 15.6< 3.12.8-150600.3.12.1
- python312-documentation&distro=openSUSE Leap 15.6< 3.12.8-150600.3.12.1
- python312&distro=openSUSE Leap 15.6< 3.12.8-150600.3.12.1
- python312&distro=openSUSE Tumbleweed< 3.12.8-1.1
Chainguard2 products
- python-3.12< 3.12.8-r1
- python-3.13< 3.13.1-r1
Suse2 products
- python312-core&distro=SUSE Linux Enterprise Module for Python 3 15 SP6< 3.12.8-150600.3.12.1
- python312&distro=SUSE Linux Enterprise Module for Python 3 15 SP6< 3.12.8-150600.3.12.1
Wolfi2 products
- python-3.12< 3.12.8-r1
- python-3.13< 3.13.1-r1
Alpine1 product
- python3< 3.12.8-r1
Debian1 product
- python3.13< 3.13.1-2
Python software foundation1 product
- cpython< 3.12.9 | ≥ 3.13.0, < 3.13.2 | ≥ 3.14.0a1, < 3.14.0a3
Ubuntu1 product
- python3.12< 3.12.3-1ubuntu0.4
8 vendors · 16 products
References
22 links- mail.python.org/archives/list/[email protected]/thread/H4O3UBAOAQQXGT4RE3E4XQYR5XLROORB/Vendor AdvisoryREPORTAdvisory
Show all 22 references
- github.com/python/cpythonPACKAGE
- lists.opensuse.org/archives/…Advisory
- lists.opensuse.org/archives/…Advisory