cve.bz

CVE-2024-12254 python software foundation cpython: Uncontrolled Resource Consumption

8.7 highEPSS 1.9%

High (8.7) in python software foundation cpython. EPSS 1.9% estimated probability of exploitation activity in the next 30 days.

On this page
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.

Severity

CVSS 4.0

8.7 high
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

CVSS 3.1

7.5 high
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
EPSS
1.9% (unchanged from 1.9% a week ago; 1.9% 30 days ago) estimated probability of exploitation activity in the next 30 days; 80th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: yes · Technical impact: partial, assessed 2024-12-06. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWEs
CWE-400 Uncontrolled Resource Consumption
CWE-770 Allocation of Resources Without Limits or Throttling
Published
Modified
NVD analysis
Deferred: the NVD does not plan to analyze it
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2024-12254 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2024-12254?via=ask-ai-copy and https://cve.bz/cve/CVE-2024-12254?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2024-12254 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
Python Software Foundation CPythonbefore 3.12.9
Python Software Foundation CPythonfrom 3.13.0 before 3.13.2
Python Software Foundation CPythonfrom 3.14.0a1 before 3.14.0a3

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian13python3.133.13.1-2DEBIAN-CVE-2024-12254
Ubuntu24.04:LTSpython3.123.12.3-1ubuntu0.4UBUNTU-CVE-2024-12254 USN-7219-1
Red Hatenterprise_linux:8::appstreampython3.12, python3.12-libs, python3.12-devel and 4 more0:3.12.8-1.el8_10RHSA-2024:10980
Red Hatenterprise_linux:8::crbpython3.12, python3.12-idle, python3.12-test and 4 more0:3.12.8-1.el8_10RHSA-2024:10980
Red Hatenterprise_linux:9::appstreampython3.12, python3.12-libs, python3.12-devel and 3 more0:3.12.5-2.el9_5.2RHSA-2024:10978
Red Hatenterprise_linux:9::crbpython3.12, python3.12-idle, python3.12-test and 4 more0:3.12.5-2.el9_5.2RHSA-2024:10978
Red Hatenterprise_linux:10.0python3, python3.12, python3-idle and 8 more0:3.12.9-1.el10RHBA-2025:6294
Red Hatrhel_eus:9.4::appstreampython3.12, python3.12-libs, python3.12-devel and 3 more0:3.12.1-4.el9_4.5RHSA-2024:11035
Red Hatrhel_eus:9.4::crbpython3.12, python3.12-idle, python3.12-test and 4 more0:3.12.1-4.el9_4.5RHSA-2024:11035
SUSELinux Enterprise Module for Python 3 15 SP6python312, python312-core3.12.8-150600.3.12.1SUSE-SU-2024:4291-1
SUSELinux Enterprise Module for Python 3 15 SP6python312, python312-core3.12.9-150600.3.18.1SUSE-SU-2025:0521-1
SUSELinux Enterprise Module for Python 3 15 SP7python313, python313-core3.13.5-150700.4.11.1SUSE-SU-2025:02074-1
openSUSELeap 15.6python312, python312-core, python312-documentation3.12.8-150600.3.12.1SUSE-SU-2024:4291-1
openSUSELeap 15.6python312, python312-core, python312-documentation3.12.9-150600.3.18.1SUSE-SU-2025:0521-1
openSUSETumbleweedpython-aiohttp3.11.16-1.1openSUSE-SU-2025:14998-1
openSUSETumbleweedpython3123.12.8-1.1openSUSE-SU-2024:14581-1
openSUSETumbleweedpython3133.13.1-1.1openSUSE-SU-2025:14691-1
AlmaLinux8python3.12, python3.12-idle, python3.12-libs and 5 more3.12.8-1.el8_10ALSA-2024:10980
AlmaLinux9python3.12, python3.12-idle, python3.12-libs and 4 more3.12.5-2.el9_5.2ALSA-2024:10978
Rocky Linux8python3.120:3.12.8-1.el8_10RLSA-2024:10980
Alpinev3.20, v3.21, v3.22 and 2 morepython33.12.8-r1ALPINE-CVE-2024-12254
Azure Linux3python33.12.3-5AZL-54042
Alpaquitastreampython33.12.8-r1BELL-CVE-2024-12254
BellSoft Hardened Containersstreampython33.12.8-r1BELL-CVE-2024-12254

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; AlmaLinux's OSV database, MIT; Rocky Linux's errata, BSD-3-Clause; the Alpine secdb, CC BY-SA 4.0; Microsoft's Azure Linux vulnerability data, MIT; BellSoft's OSV database, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE · Alpine · Alpaquita · BellSoft Hardened Containers.

Red Hat

Red Hat rates this Important.

Red Hat's statement

This vulnerability likely impacts a small number of users. You must be using Python 3.12.0 or later, on 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.

This vulnerability is rated with an Important severity due to its potential for denial of service (DoS) attacks through memory exhaustion. By failing to signal the protocol to drain the write buffer when approaching the high-water mark, the affected `asyncio._SelectorSocketTransport.writelines()` method introduces a important flaw in flow control. This flaw can lead to uncontrolled growth of the buffer in long-running or high-throughput applications, which are typical in networked systems or event-driven architectures. Given that `asyncio` is widely used in performance-critical Python applications for handling asynchronous I/O, the impact of memory exhaustion could destabilize services, compromise system availability, and increase the risk of cascading failures, especially in production environments handling large-scale or untrusted inputs.

Red Hat's mitigation

Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 10python3.12-0:3.12.9-1.el10Fixed 2025-05-13RHBA-2025:6294
Red Hat Enterprise Linux 8python3.12-0:3.12.8-1.el8_10Fixed 2024-12-12RHSA-2024:10980
Red Hat Enterprise Linux 9python3.12-0:3.12.5-2.el9_5.2Fixed 2024-12-12RHSA-2024:10978
Red Hat Enterprise Linux 9.4 Extended Update Supportpython3.12-0:3.12.1-4.el9_4.5Fixed 2024-12-13RHSA-2024:11035
Red Hat Enterprise Linux 6pythonNot affected
Red Hat Enterprise Linux 7pythonNot affected
Red Hat Enterprise Linux 7python3Not affected
Red Hat Enterprise Linux 8gimp:flatpak/python2Not affected
Red Hat Enterprise Linux 8python3Not affected
Red Hat Enterprise Linux 8python3.11Not affected
Red Hat Enterprise Linux 8python36:3.6/python36Not affected
Red Hat Enterprise Linux 8python39:3.9/python39Not affected
Red Hat Enterprise Linux 8python39-devel:3.9/python39Not affected
Red Hat Enterprise Linux 9python3.11Not affected
Red Hat Enterprise Linux 9python3.9Not affected
Red Hat Enterprise Linux AI (RHEL AI)rhelai1/bootc-amd-rhel9Not affected
Red Hat Enterprise Linux AI (RHEL AI)rhelai1/bootc-azure-nvidia-rhel9Not affected
Red Hat Enterprise Linux AI (RHEL AI)rhelai1/bootc-nvidia-rhel9Not affected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2024-12254.

Attack patterns (CAPEC)

  • CAPEC-147 XML Ping of the Death Likelihood: Low · Severity: Medium
  • CAPEC-227 Sustained Client Engagement
  • CAPEC-492 Regular Expression Exponential Blowup

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits. More on the page of CWE-770 (20).

References

Check your stackJSON