CVE-2024-12254 json
Unbounded memory buffering in SelectorSocketTransport.writelines()
published 2024-12-06 23 mo ago modified 2026-07-31 3 mo ago also BIT-libpython-2024-12254 , BIT-python-2024-12254 , BIT-python-min-2024-12254 , EUVD-2024-50718
- cvss
- 7.5
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.9%
- EPSS 1.9% chance of exploitation in 30 days, percentile 79%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- bitnami libpython 3.12.9, 3.13.2
- bitnami python 3.12.9, 3.13.2
- bitnami python-min 3.12.9, 3.13.2
- Python Software Foundation CPython 3.12.9, 3.13.2, 3.14.0a3
- python_software_foundation cpython 3.14.0a1
- python3.13 Debian 13 3.13.1-2
debian advisories DEBIAN-CVE-2024-12254
- python3.12 Ubuntu 24.04 LTS 3.12.3-1ubuntu0.4
ubuntu advisories UBUNTU-CVE-2024-12254
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- python3.12 RHEL 10.0 3.12.9-1.el10
- python3 RHEL 10.0 3.12.9-1.el10
- python3-idle RHEL 10.0 3.12.9-1.el10
- python3-libs RHEL 10.0 3.12.9-1.el10
- python3-test RHEL 10.0 3.12.9-1.el10
- python3-tkinter RHEL 10.0 3.12.9-1.el10
- python-unversioned-command RHEL 10.0 3.12.9-1.el10
- python3.12 RHEL 8 3.12.8-1.el8_10
red hat advisories RHBA-2025:6294RHSA-2024:11035RHSA-2024:10980RHSA-2024:10978
- python313 SLE Module for Python 3 15 SP7 3.13.5-150700.4.11.1
- python313-core SLE Module for Python 3 15 SP7 3.13.5-150700.4.11.1
- python312 SLE Module for Python 3 15 SP6, openSUSE Leap 15.6 3.12.9-150600.3.18.1
- python312-core SLE Module for Python 3 15 SP6, openSUSE Leap 15.6 3.12.9-150600.3.18.1
- python312-documentation openSUSE Leap 15.6 3.12.9-150600.3.18.1
- python312 SLE Module for Python 3 15 SP6, openSUSE Leap 15.6 3.12.8-150600.3.12.1
- python312-core SLE Module for Python 3 15 SP6, openSUSE Leap 15.6 3.12.8-150600.3.12.1
- python312-documentation openSUSE Leap 15.6 3.12.8-150600.3.12.1
suse advisories SUSE-SU-2025:02074-1SUSE-SU-2025:0521-1SUSE-SU-2024:4291-1
- python-aiohttp openSUSE Tumbleweed 3.11.16-1.1
- python313 openSUSE Tumbleweed 3.13.1-1.1
- python312 openSUSE Tumbleweed 3.12.8-1.1
opensuse advisories openSUSE-SU-2025:14998-1openSUSE-SU-2025:14691-1openSUSE-SU-2024:14581-1
- python3.12 AlmaLinux 9 3.12.5-2.el9_5.2
- python3.12-idle AlmaLinux 9 3.12.5-2.el9_5.2
- python3.12-libs AlmaLinux 9 3.12.5-2.el9_5.2
- python3.12-test AlmaLinux 9 3.12.5-2.el9_5.2
- python3.12-tkinter AlmaLinux 9 3.12.5-2.el9_5.2
- python3.12 AlmaLinux 8 3.12.8-1.el8_10
- python3.12-idle AlmaLinux 8 3.12.8-1.el8_10
- python3.12-libs AlmaLinux 8 3.12.8-1.el8_10
almalinux advisories ALSA-2024:10978ALSA-2024:10980
- python3.12 Rocky Linux 9 3.12.5-2.el9_5.2
- python3.12 Rocky Linux 8 3.12.8-1.el8_10
rocky linux advisories RLSA-2024:10978RLSA-2024:10980
- python3 Alpine 3.24, Alpine 3.23, Alpine 3.22 +2 more 3.12.8-r1
alpine advisories ALPINE-CVE-2024-12254
Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- github.com/python/cpython@71e8429 commit
- github.com/python/cpython@9aa0deb commit
- github.com/python/cpython@e991ac8 commit
- github.com/python/cpython#127656 pull request
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2024-12254 updated cvss 7.5
python: Unbounded memory buffering in SelectorSocketTransport.writelines()
-
Red Hat CodeReady Linux Builder (v. 9) python3.12 3.12.5-2.el9_5.2, python3.12-idle 3.12.5-2.el9_5.2, python3.12-test 3.12.5-2.el9_5.2, python3.12-tkinter 3.12.5-2.el9_5.2fixed: vendor fix RHSA-2024:10978
-
Red Hat CodeReady Linux Builder EUS (v.9.4) python3.12 3.12.1-4.el9_4.5, python3.12-idle 3.12.1-4.el9_4.5, python3.12-test 3.12.1-4.el9_4.5, python3.12-tkinter 3.12.1-4.el9_4.5fixed: vendor fix RHSA-2024:11035
-
Red Hat Enterprise Linux AppStream (v. 8) python3.12 3.12.8-1.el8_10, python3.12-libs 3.12.8-1.el8_10, python3.12-tkinter 3.12.8-1.el8_10, python3.12-rpm-macros 3.12.8-1.el8_10fixed: vendor fix RHSA-2024:10980
-
Red Hat Enterprise Linux AppStream (v. 9) python3.12 3.12.5-2.el9_5.2, python3.12-libs 3.12.5-2.el9_5.2, python3.12-tkinter 3.12.5-2.el9_5.2fixed: vendor fix RHSA-2024:10978
-
Red Hat Enterprise Linux AppStream (v. 10) python3-tkinter 3.12.9-1.el10, python-unversioned-command 3.12.9-1.el10fixed: vendor fix RHBA-2025:6294
-
Red Hat Enterprise Linux AppStream EUS (v.9.4) python3.12 3.12.1-4.el9_4.5, python3.12-libs 3.12.1-4.el9_4.5, python3.12-tkinter 3.12.1-4.el9_4.5fixed: vendor fix RHSA-2024:11035
-
Red Hat Enterprise Linux BaseOS (v. 10) python3 3.12.9-1.el10, python3.12 3.12.9-1.el10, python3-libs 3.12.9-1.el10 Red Hat Enterprise Linux CodeReady Linux Builder (v. 10) python3-idle 3.12.9-1.el10, python3-test 3.12.9-1.el10fixed: vendor fix RHBA-2025:6294
-
Red Hat Enterprise Linux CRB (v. 8) python3.12 3.12.8-1.el8_10, python3.12-idle 3.12.8-1.el8_10, python3.12-test 3.12.8-1.el8_10, python3.12-tkinter 3.12.8-1.el8_10fixed: vendor fix RHSA-2024:10980
show 1 moreshow fewer
-
Red Hat Enterprise Linux 6 python, tkinter, python-libs, python-test, python-tools Red Hat Enterprise Linux 7 python, python3, tkinter, python-libs, python-test, python-tools, +4 more Red Hat Enterprise Linux 8 numpy, scipy, PyYAML, python2, python3, mod_wsgi, +88 more Red Hat Enterprise Linux 9 python3, python3.9, python3.11, python3-idle, python3-libs, python3-test, +6 more Red Hat Enterprise Linux AI (RHEL AI) bootc-amd-rhel9, bootc-nvidia-rhel9, bootc-azure-nvidia-rhel9not affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- yes
- Technical impact
- partial
- Assessed
- 23 mo ago
Exploit prediction
1.87% chance of exploitation in the next 30 days, higher than 79% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 4.0 | 8.7 | 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 |
| CISA ADP | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| CNA | 4.0 | 8.7 | 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 |
| CNA | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| bitnami | libpython | >=3.12.0, <3.12.9 >=3.13.0, <3.13.2 |
3.12.9 3.13.2 |
| bitnami | python | >=3.12.0, <3.12.9 >=3.13.0, <3.13.2 |
3.12.9 3.13.2 |
| bitnami | python-min | >=3.12.0, <3.12.9 >=3.13.0, <3.13.2 |
3.12.9 3.13.2 |
Affected products
- Python Software Foundation CPython
- python_software_foundation cpython
Classification
References
-
github.com
/python/cpython/pull/127656
patch, web
-
github.com
/python/cpython/commit/71e8429ac8e2adc10084ab5ec29a62f4b6671a82
patch, web
-
github.com
/python/cpython/commit/9aa0deb2eef2655a1029ba228527b152353135b5
patch, web
-
github.com
/python/cpython/commit/e991ac8f2037d78140e417cc9a9486223eb3e786
patch, web
-
mail.python.org
/archives/list/security-announce@python.org/thread/H4O3UBAOAQQXGT4RE3E4XQYR5XLROORB/
vendor-advisory, web
-
github.com
/python/cpython/issues/127655
issue-tracking, web
-
openwall.com
/lists/oss-security/2024/12/06/1
web
-
security.netapp.com
/advisory/ntap-20250404-0010/
web
-
nvd.nist.gov
/vuln/detail/CVE-2024-12254
web
Sources
- CVE List CVE-2024-12254
- NVD CVE-2024-12254
- OSV BIT-libpython-2024-12254
- OSV BIT-python-2024-12254
- OSV BIT-python-min-2024-12254
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.
CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.