CVE-2024-12254: Unbounded memory buffering in SelectorSocketTransport.writelines()
Noroxi assessment
Priority: Monitor (action score 35/100)
- The sources we track (CISA KEV, Exploit-DB, Metasploit, Nuclei, GitHub) show no public exploit code or exploitation in the wild.
- Probability of exploitation in the next 30 days: 1.8% (FIRST EPSS); higher than 79.6% of all records.
- Anyone who can reach it over the internet can trigger it. No account or password is required. No user action is required. No special conditions are required; it is repeatable.
- According to CISA the attack is automatable: targets can be found by mass scanning.
- Fixed version: Python Software Foundation CPython 3.12.9, 3.13.2, 3.14.0a3; azl3 python3 3.12.3-5 on Azure Linux 3.0 3.12.3-5.
Low priority for now. Upgrade to Python Software Foundation CPython 3.12.9, 3.13.2, 3.14.0a3; azl3 python3 3.12.3-5 on Azure Linux 3.0 3.12.3-5 or later.
Generated automatically from the record's data: CVSS (NVD and CNA), CISA KEV and SSVC, FIRST EPSS, exploit sources, fixed versions. How we calculate it
Primary sources: NVD · CVE.org · FIRST EPSS
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.
- Published
- Dec 6, 2024
- Updated
- Jul 31, 2026
- EPSS
- 1.8% · 79th percentile
- CWE
- CWE-400
Report tools
Action score
35
Low priority for now.
- CVSS
- 34 / 40 · 8.7 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 1 / 30 · 1.8%
CISA SSVC decision
- Exploitation
- none
- Automatable
- yes
- Technical impact
- partial
Vulnrichment: CISA's decision-tree inputs.
CNA vs NVD score
- NVD
- —
- CNA · PSF
- 8.7
- NVD has not scored this yet; the score shown is the CNA’s.
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
The score given by the assigning authority versus NVD’s independent score. A gap means the severity is contested.
Get told when this record changes
- Not in KEV: no record of exploitation in the wild
- No public exploit code on record
- A fix has been released
If any of these changes, we'll tell you in the daily email digest.
Is your version affected? Check itNoroxi analysis
What does it mean in your environment?
The assessment above is generated automatically from the record's data; it doesn't know your environment. Our team verifies on your systems whether this vulnerability is actually exploitable and which mitigation is enough.
We use this product, ask for helpAffected systems
Is your version affected?
Pick the product and type the version you run. It's compared with this record's version ranges in your browser; the version isn't sent anywhere.
| Vendor | Product | CPE |
|---|---|---|
| python software foundation | cpython | cpe:2.3:a:python_software_foundation:cpython |
Versions reported by the vendor
Affected version ranges reported by the assigning authority (PSF). Independent of NVD's CPE analysis and usually ahead of it.
Python Software Foundation CPython
- before 3.12.9affected · python
- 3.13.0 and later · before 3.13.2affected · python
- 3.14.0a1 and later · before 3.14.0a3affected · python
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| AlmaLinux:8 | python3.12 | before 3.12.8-1.el8_10 | 3.12.8-1.el8_10 |
| AlmaLinux:8 | python3.12-debug | before 3.12.8-1.el8_10 | 3.12.8-1.el8_10 |
| AlmaLinux:8 | python3.12-devel | before 3.12.8-1.el8_10 | 3.12.8-1.el8_10 |
| AlmaLinux:8 | python3.12-idle | before 3.12.8-1.el8_10 | 3.12.8-1.el8_10 |
| AlmaLinux:8 | python3.12-libs | before 3.12.8-1.el8_10 | 3.12.8-1.el8_10 |
| AlmaLinux:8 | python3.12-rpm-macros | before 3.12.8-1.el8_10 | 3.12.8-1.el8_10 |
| AlmaLinux:8 | python3.12-test | before 3.12.8-1.el8_10 | 3.12.8-1.el8_10 |
| AlmaLinux:8 | python3.12-tkinter | before 3.12.8-1.el8_10 | 3.12.8-1.el8_10 |
| AlmaLinux:9 | python3.12 | before 3.12.5-2.el9_5.2 | 3.12.5-2.el9_5.2 |
| AlmaLinux:9 | python3.12-debug | before 3.12.5-2.el9_5.2 | 3.12.5-2.el9_5.2 |
| AlmaLinux:9 | python3.12-devel | before 3.12.5-2.el9_5.2 | 3.12.5-2.el9_5.2 |
| AlmaLinux:9 | python3.12-idle | before 3.12.5-2.el9_5.2 | 3.12.5-2.el9_5.2 |
| AlmaLinux:9 | python3.12-libs | before 3.12.5-2.el9_5.2 | 3.12.5-2.el9_5.2 |
| AlmaLinux:9 | python3.12-test | before 3.12.5-2.el9_5.2 | 3.12.5-2.el9_5.2 |
| AlmaLinux:9 | python3.12-tkinter | before 3.12.5-2.el9_5.2 | 3.12.5-2.el9_5.2 |
| Alpine:v3.20 | python3 | before 3.12.8-r1 | 3.12.8-r1 |
| Debian:13 | python3.13 | before 3.13.1-2 | 3.13.1-2 |
| openSUSE:Leap 15.6 | python312 | before 3.12.9-150600.3.18.1 | 3.12.9-150600.3.18.1 |
| openSUSE:Leap 15.6 | python312 | before 3.12.8-150600.3.12.1 | 3.12.8-150600.3.12.1 |
| openSUSE:Leap 15.6 | python312-core | before 3.12.9-150600.3.18.1 | 3.12.9-150600.3.18.1 |
| openSUSE:Leap 15.6 | python312-core | before 3.12.8-150600.3.12.1 | 3.12.8-150600.3.12.1 |
| openSUSE:Leap 15.6 | python312-documentation | before 3.12.8-150600.3.12.1 | 3.12.8-150600.3.12.1 |
| openSUSE:Leap 15.6 | python312-documentation | before 3.12.9-150600.3.18.1 | 3.12.9-150600.3.18.1 |
| openSUSE:Tumbleweed | python-aiohttp | before 3.11.16-1.1 | 3.11.16-1.1 |
+49
Same product
python software foundation: all recordsOther highest-scoring records for the same primary product.
- CVE-2026-115557Distrust compromised intermediate certificates in ssl module37Monitor
- CVE-2025-4517Arbitrary writes via tarfile realpath overflow37Monitor
- CVE-2026-19445Use-after-free of a server-side SSLContext when sni_callback switches contexts36Monitor
Published before and after this one in the same product
- ← EarlierCVE-2024-8088Aug 22, 2024 · Infinite loop when iterating over zip archive entry names from zipfile.Path34Monitor
- ← EarlierCVE-2024-11168Nov 12, 2024 · Improper validation of IPv6 and IPvFuture addresses25Monitor
- Later →CVE-2025-0938Jan 31, 2025 · URL parser allowed square brackets in domain names25Monitor
Remediation
Which version to upgrade to
Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.
| Product / package | Fixed version | Source |
|---|---|---|
| Python Software Foundation CPython | 3.12.9 | Vendor (CNA) |
| Python Software Foundation CPython | 3.13.2 | Vendor (CNA) |
| Python Software Foundation CPython | 3.14.0a3 | Vendor (CNA) |
| azl3 python3 3.12.3-5 on Azure Linux 3.0 | 3.12.3-5 · CBL-Mariner Releases | Microsoft (MSRC) |
| almalinux:python3.12 | 3.12.5-2.el9_5.2 · AlmaLinux:9 | Package registry (OSV) |
| almalinux:python3.12-debug | 3.12.5-2.el9_5.2 · AlmaLinux:9 | Package registry (OSV) |
| almalinux:python3.12-devel | 3.12.5-2.el9_5.2 · AlmaLinux:9 | Package registry (OSV) |
| almalinux:python3.12-idle | 3.12.5-2.el9_5.2 · AlmaLinux:9 | Package registry (OSV) |
| almalinux:python3.12-libs | 3.12.5-2.el9_5.2 · AlmaLinux:9 | Package registry (OSV) |
| almalinux:python3.12-rpm-macros | 3.12.8-1.el8_10 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:python3.12-test | 3.12.5-2.el9_5.2 · AlmaLinux:9 | Package registry (OSV) |
| almalinux:python3.12-tkinter | 3.12.5-2.el9_5.2 · AlmaLinux:9 | Package registry (OSV) |
| alpine:python3 | 3.12.8-r1 · Alpine:v3.20 | Package registry (OSV) |
| debian:python3.13 | 3.13.1-2 · Debian:13 | Package registry (OSV) |
| opensuse:python-aiohttp | 3.11.16-1.1 · openSUSE:Tumbleweed | Package registry (OSV) |
| opensuse:python312 | 3.12.8-150600.3.12.1 · openSUSE:Leap 15.6 | Package registry (OSV) |
| opensuse:python312-core | 3.12.8-150600.3.12.1 · openSUSE:Leap 15.6 | Package registry (OSV) |
| opensuse:python312-documentation | 3.12.8-150600.3.12.1 · openSUSE:Leap 15.6 | Package registry (OSV) |
| opensuse:python313 | 3.13.1-1.1 · openSUSE:Tumbleweed | Package registry (OSV) |
| red hat:python-unversioned-command | 0:3.12.9-1.el10 · Red Hat:enterprise_linux:10.0 | Package registry (OSV) |
| red hat:python3 | 0:3.12.9-1.el10 · Red Hat:enterprise_linux:10.0 | Package registry (OSV) |
| red hat:python3-debug | 0:3.12.9-1.el10 · Red Hat:enterprise_linux:10.0 | Package registry (OSV) |
| red hat:python3-devel | 0:3.12.9-1.el10 · Red Hat:enterprise_linux:10.0 | Package registry (OSV) |
| red hat:python3-idle | 0:3.12.9-1.el10 · Red Hat:enterprise_linux:10.0 | Package registry (OSV) |
| red hat:python3-libs | 0:3.12.9-1.el10 · Red Hat:enterprise_linux:10.0 | Package registry (OSV) |
| red hat:python3-test | 0:3.12.9-1.el10 · Red Hat:enterprise_linux:10.0 | Package registry (OSV) |
| red hat:python3-tkinter | 0:3.12.9-1.el10 · Red Hat:enterprise_linux:10.0 | Package registry (OSV) |
| red hat:python3.12 | 0:3.12.9-1.el10 · Red Hat:enterprise_linux:10.0 | Package registry (OSV) |
| red hat:python3.12-debuginfo | 0:3.12.9-1.el10 · Red Hat:enterprise_linux:10.0 | Package registry (OSV) |
| red hat:python3.12-debugsource | 0:3.12.9-1.el10 · Red Hat:enterprise_linux:10.0 | Package registry (OSV) |
+6
Exploit status
No known public exploit
No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.
Research context
For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.
Timeline
From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.
No dated events beyond publication.
Patch and commit links
Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.
Credits
All researchersFinders, reporters and analysts named in the CNA record. Click a name for that researcher’s other records.
- Seth Larsoncoordinator
- J. Nick Kostonreporter
Not on record for this CVE: EPSS history · variant or chain candidate · public bounty program.
Technical details
Attack conditions
- Anyone who can reach it over the internet can trigger it.
- No account or password is required.
- No user action is required.
- No special conditions are required; it is repeatable.
If successful
- Confidentiality
- Integrity
- Availability
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
- Scope
- X
Weakness class (CWE)
CWE-400 · Uncontrolled Resource ConsumptionCVSS vector
CVSS: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
nvd-secondary
Root cause
Code that parses nested structures sets no depth or size limit. A small input can turn into a disproportionate processing load.
The bug in code
The whole CWE-400 classA representative example of this vulnerability class. Not the vendor's source code; it shows the faulty pattern and its fix.
Vulnerable
function expand(node) {
return node.children.map(expand);
}Fixed
const MAX_DEPTH = 32;
function expand(node, depth = 0) {
if (depth > MAX_DEPTH) throw new Error("too deep");
return node.children.map((c) => expand(c, depth + 1));
}Attack context
MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.
Change log (1)
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
Show all references (7 more)Show less
- github.com/python/cpython/commit/9aa0deb2eef2655a1029ba228527b152353135b5
- github.com/python/cpython/commit/e991ac8f2037d78140e417cc9a9486223eb3e786
- github.com/python/cpython/issues/127655
- github.com/python/cpython/pull/127656
- mail.python.org/archives/list/security-announce@python.org/thread/H4O3UBAOAQQXGT4RE3E4XQYR5XLROORB/
- www.openwall.com/lists/oss-security/2024/12/06/1
- security.netapp.com/advisory/ntap-20250404-0010/
Vendor advisories and official records. Exploit/PoC links are deliberately left out.