Memory Exhaustion Risk in Python's asyncio Module on macOS and Linux
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
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
Install the CPython MacOS release that fixes your version line, or later:
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
- Memory exhaustion: Attackers can exploit this vulnerability to cause excessive memory usage, potentially leading to application crashes or degraded performance.
News Articles
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
More Python Software Foundation Vulnerabilities
Security Flaw in Python's SSL Module Affecting Certificate Management
Symlink Vulnerability in Python's tarfile Module
Arbitrary Filesystem Write Vulnerability in Python Tarfile Module
Facts on this page come from the sources listed above; the writeup is AI-assisted. How we rate vulnerabilities ยท Report a correction
