Memory Exhaustion Risk in Python's asyncio Module on macOS and Linux

Patch this weekDenial of service over the network, no login needed.
8.7HIGH

CVE-2024-12254

Key Information:

Vendor

Python Software Foundation

Status
Cpython
CVE ID
CVE ID:
CVE-2024-12254
Vendor
CVE Published:
6 December 2024
Fixed in
Fixed in:
3.12.9, 3.13.2, 3.14.0a3

Timeline

Exploit known 4 days after it was published

  • ๐Ÿ‘พ

    Exploit known to exist

  • ๐Ÿ“ฐ

    First article discovered by CybersecurityNews

  • Vulnerability published

Badges

๐Ÿ“ˆ Score: 397๐Ÿ‘พ Exploit Exists๐Ÿ“ฐ News Worthy

How risky is it?

  • Yes: Works over the network, no login needed
  • Partly: Exploitation or a working exploit reported
  • No: Not on CISA's exploited list
  • No: No ransomware use seen

Our verdict

Patch this week

Exploitation is likely. Prioritise the fix.

What to do

1Update to a fixed version
CPython MacOS 0 to below 3.12.9 is vulnerable
CPython MacOS 3.13.0 to below 3.13.2 is vulnerable
CPython MacOS 3.14.0a1 to below 3.14.0a3 is vulnerable

Install the CPython MacOS release that fixes your version line, or later:

3.12.93.13.23.14.0a3
Read the vendor advisory โ†—
2Can't patch yet? Reduce exposure

It can be reached over the network, so limit who can reach CPython MacOS. Block it from the internet, allow only trusted hosts or a VPN, and turn off the affected feature if you don't use it, until you can update.

3Look for signs of compromise

Exploitation has been reported, so check logs on exposed CPython MacOS systems for unusual requests or new processes from before you patched.

4Why it's rated "Patch this week"
  • Exploitation or a working exploit has been reported.
  • It can be exploited remotely without credentials.
  • Its CVSS severity is high (8.7).

What is CVE-2024-12254?

CVE-2024-12254 is a vulnerability in the asyncio module of CPython, affecting versions 3.12.0 and later on macOS and Linux. The flaw is located in the asyncio._SelectorSocketTransport.writelines() method, which fails to pause writing when the write buffer reaches a "high-water mark." This oversight prevents the buffer from being drained, potentially leading to unbounded memory usage and memory exhaustion under specific conditions.

The vulnerability specifically impacts users who are using Python 3.12.0 or later, the asyncio module with protocols, and the .writelines() method. If any of these conditions are not met, the Python installation is likely unaffected.

Potential Impact of CVE-2024-12254

  1. Memory exhaustion: Attackers can exploit this vulnerability to cause excessive memory usage, potentially leading to application crashes or degraded performance.

News Articles

favicon imageCybersecurityNews

Critical Vulnerability in Python Affected MacOS or Linux Leads to Exploiting The Memory

A high-severity vulnerability (CVE-2024-12254) impacting CPython has been publicly disclosed, affecting Python versions 3.12.0 and later.

References

Security Flaw in Python's SSL Module Affecting Certificate Management

CVE-2026-115557
Python Software F...Cpython๐Ÿ˜„9.4CRITICAL

Symlink Vulnerability in Python's tarfile Module

CVE-2026-11940
Python Software F...Cpython7.8HIGH

Arbitrary Filesystem Write Vulnerability in Python Tarfile Module

CVE-2025-4517
Python Software F...Cpython๐Ÿ‘พ9.4CRITICAL
View more Python Software Foundation vulnerabilities...

Facts on this page come from the sources listed above; the writeup is AI-assisted. How we rate vulnerabilities ยท Report a correction

CVSS V4

Score:
8.7
Severity:
HIGH
Confidentiality:
None
Integrity:
None
Availability:
High
Attack Vector:
Network
Attack Complexity:
Low
Attack Required:
None
Privileges Required:
Undefined
User Interaction:
None

Credit

J. Nick Koston
Seth Larson
.