Skip to content
OpenAdvisories
High · 8.7 CVE-2024-12254 EUVD-2024-50718GHSA-ph84-rcj2-fxxm

Unbounded memory buffering in SelectorSocketTransport.writelines()

Published Dec 6, 2024 · Updated Jul 31, 2026 · Assigned by PSF

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.

Affected products

VendorProductAffectedFixed
Python Software Foundation CPython < 3.12.9, 3.13.0 – < 3.13.2, 3.14.0a1 – < 3.14.0a3 3.12.9

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 13 python3.13 3.13.1-2 —
ReleasePackageFixed inAdvisory
Ubuntu 24.04 LTS python3.12 3.12.3-1ubuntu0.4 USN-7219-1
ReleasePackageFixed inAdvisory
RHEL 10 python3 +8 3.12.9-1.el10 RHBA-2025:6294
RHEL 9 python3.12 +6 3.12.5-2.el9_5.2 RHSA-2024:10978
RHEL 8 python3.12 +7 3.12.8-1.el8_10 RHSA-2024:10980
Show 1 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
RHEL 9.4 EUS python3.12 +6 3.12.1-4.el9_4.5 RHSA-2024:11035

AlmaLinux

Errata ↗
ReleasePackageFixed inAdvisory
AlmaLinux 9 python3.12 +6 3.12.5-2.el9_5.2 ALSA-2024:10978
AlmaLinux 8 python3.12 +7 3.12.8-1.el8_10 ALSA-2024:10980

Rocky Linux

Errata ↗
ReleasePackageFixed inAdvisory
Rocky Linux 8 python3.12 3.12.8-1.el8_10 RLSA-2024:10980
ReleasePackageFixed inAdvisory
SLES 3 python312 +1 3.12.8-150600.3.12.1 SUSE-SU-2025:0521-1, SUSE-SU-2024:4291-1
SLES 3 python313 +1 3.13.5-150700.4.11.1 SUSE-SU-2025:02074-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed python-aiohttp 3.11.16-1.1 openSUSE-SU-2025:14998-1
openSUSE Tumbleweed python312 3.12.8-1.1 openSUSE-SU-2024:14581-1
openSUSE Tumbleweed python313 3.13.1-1.1 openSUSE-SU-2025:14691-1
openSUSE Leap 15.6 python312 +2 3.12.8-150600.3.12.1 SUSE-SU-2025:0521-1, SUSE-SU-2024:4291-1
ReleasePackageFixed inAdvisory
Alpine v3.24 python3 3.12.8-r1 —
Alpine v3.23 python3 3.12.8-r1 —
Alpine v3.22 python3 3.12.8-r1 —
Alpine v3.21 python3 3.12.8-r1 —
Alpine v3.20 python3 3.12.8-r1 —

Amazon Linux

ReleasePackageFixed inAdvisory
Amazon Linux 2023 python3.12 +6 3.12.8-1.amzn2023.0.1 ALAS2023-2025-808

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 3 python3 3.12.3-5 —

Oracle Linux

ReleasePackageFixed inAdvisory
Oracle Linux 9 python3.12 +6 3.12.5-2.el9_5.2 ELSA-2024-10978
Oracle Linux 8 python3.12 +7 3.12.8-1.el8_10 ELSA-2024-10980

Wolfi

ReleasePackageFixed inAdvisory
Wolfi rolling python-3.12 3.12.8-r1 —
Wolfi rolling python-3.13 3.13.1-r1 —

Advisories 18

References