Skip to content
Fencer Vulns
high 7.5

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

  • python3 Azure Linux 3.0 3.12.3-5

azure linux advisories AZL-54042

Azure Linux vulnerability data, Copyright (c) Microsoft Corporation, from https://github.com/microsoft/AzureLinuxVulnerabilityData via OSV, under the MIT licence; changed: normalised to fixed package versions per release. MIT

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.2
    fixed: 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.5
    fixed: 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_10
    fixed: 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.2
    fixed: 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.el10
    fixed: 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.5
    fixed: 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.el10
    fixed: 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_10
    fixed: vendor fix RHSA-2024:10980
show 1 more
  • 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-rhel9
    not 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

Weakness
  • CWE-400 Uncontrolled Resource Consumption
  • CWE-770 Allocation of Resources Without Limits or Throttling

References

Sources

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.