Join the Cyber Forum: Threat Intel on May 12, 2026 to learn how AI is reshaping threat defense.Join the Virtual Cyber Forum: Threat IntelRegister Now
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2024-12254

CVE-2024-12254: Python asyncio DoS Vulnerability

CVE-2024-12254 is a denial of service flaw in Python 3.12+ asyncio module that causes memory exhaustion through improper write buffer handling. This article covers technical details, affected versions, and mitigation.

Published: January 28, 2026

CVE-2024-12254 Overview

CVE-2024-12254 is a memory exhaustion vulnerability in Python's asyncio module affecting versions 3.12.0 and later. The flaw exists in the asyncio._SelectorSocketTransport.writelines() method, which fails to properly "pause" writing and signal to the Protocol to drain the buffer to the wire once the write buffer reaches the "high-water mark." This oversight prevents Protocols from periodically draining the write buffer, potentially leading to unbounded memory consumption and system resource exhaustion.

Critical Impact

Network-accessible applications using Python 3.12.0+ with asyncio protocols and the .writelines() method on macOS or Linux are vulnerable to denial of service through memory exhaustion attacks.

Affected Products

  • Python 3.12.0 and later versions on macOS
  • Python 3.12.0 and later versions on Linux
  • Applications using asyncio module with protocols and .writelines() method

Discovery Timeline

  • 2024-12-06 - CVE-2024-12254 published to NVD
  • 2025-04-04 - Last updated in NVD database

Technical Details for CVE-2024-12254

Vulnerability Analysis

This vulnerability is classified under CWE-400 (Uncontrolled Resource Consumption) and CWE-770 (Allocation of Resources Without Limits or Throttling). The flaw was introduced with the new zero-copy-on-write behavior implemented in Python 3.12.0 for the writelines() method within the asyncio transport layer.

Under normal operation, Python's asyncio transport layer implements flow control using high-water and low-water marks. When the write buffer exceeds the high-water mark, the transport should pause writing and signal the protocol to drain the buffer. However, the _SelectorSocketTransport.writelines() method bypasses this critical flow control mechanism.

The vulnerability requires a specific configuration to be exploitable: the target system must be running Python 3.12.0 or later, operating on macOS or Linux, utilizing the asyncio module with protocols, and specifically using the .writelines() method. While this limits the attack surface, affected applications are susceptible to complete denial of service through memory exhaustion.

Root Cause

The root cause lies in the implementation of the writelines() method in asyncio._SelectorSocketTransport. When the zero-copy-on-write optimization was added in Python 3.12.0, the method was not updated to properly check buffer levels against the high-water mark and trigger the pause/drain mechanism. This allows unlimited data accumulation in the write buffer without the standard flow control signals being sent to the protocol layer.

Attack Vector

The vulnerability is exploitable over the network without requiring authentication or user interaction. An attacker can send a continuous stream of data to a vulnerable asyncio-based server that uses the writelines() method. Since the flow control mechanism is bypassed, the server will continue accepting and buffering data without draining, eventually exhausting available memory and causing a denial of service condition.

The attack scenario involves:

  1. Identifying a target application using Python 3.12.0+ with asyncio protocols
  2. Establishing a connection to the asyncio-based service
  3. Sending data at a rate that exceeds the network's ability to transmit
  4. The server buffers all data without triggering flow control
  5. Memory exhaustion occurs, leading to application or system crash

For detailed technical information about the vulnerability mechanism, refer to the GitHub Issue Discussion and the Python Security Announcement.

Detection Methods for CVE-2024-12254

Indicators of Compromise

  • Unusual memory growth in Python processes running asyncio-based applications
  • Python applications using asyncio protocols experiencing out-of-memory conditions
  • Network services built with asyncio becoming unresponsive after sustained traffic
  • System-level memory exhaustion on servers hosting Python 3.12.0+ applications

Detection Strategies

  • Monitor Python process memory usage for abnormal growth patterns during network operations
  • Implement application-level logging to track write buffer sizes in asyncio transports
  • Use process monitoring tools to detect memory leaks in asyncio-based services
  • Review application code for usage of asyncio._SelectorSocketTransport.writelines() method

Monitoring Recommendations

  • Configure memory usage alerts for Python processes exceeding expected thresholds
  • Implement periodic health checks on asyncio-based services to detect responsiveness degradation
  • Monitor system-level memory metrics for hosts running affected Python versions
  • Enable asyncio debug mode during development to identify flow control issues

How to Mitigate CVE-2024-12254

Immediate Actions Required

  • Upgrade to patched Python versions that include the fix for this vulnerability
  • Review applications for usage of writelines() in asyncio protocol implementations
  • Consider implementing application-level rate limiting for data ingestion
  • Monitor memory consumption of affected applications until patches can be applied

Patch Information

The Python development team has released fixes addressing this vulnerability. The patches restore proper flow control behavior in the asyncio._SelectorSocketTransport.writelines() method. Technical details of the fixes can be found in the following commits:

  • Primary Fix Commit
  • Additional Update Commit
  • Supplementary Commit

The Pull Request contains the complete discussion and implementation details. Organizations using NetApp products should also review the NetApp Security Advisory.

Workarounds

  • Use the write() method instead of writelines() as an alternative that properly implements flow control
  • Implement custom flow control at the application layer to limit buffer growth
  • Consider using Python versions prior to 3.12.0 if the zero-copy optimization is not required
  • Add explicit buffer size checks and manual drain calls in protocol implementations
bash
# Check Python version to determine vulnerability status
python3 --version

# Identify asyncio usage in codebase
grep -r "writelines" --include="*.py" /path/to/application

# Monitor Python process memory usage
watch -n 5 'ps aux | grep python | grep -v grep'

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeDOS

  • Vendor/TechPython

  • SeverityHIGH

  • CVSS Score8.7

  • EPSS Probability0.25%

  • Known ExploitedNo
  • CVSS Vector
  • 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
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-400

  • CWE-770
  • Technical References
  • GitHub Commit Update

  • GitHub Commit Fix

  • GitHub Commit Update

  • GitHub Issue Discussion

  • GitHub Pull Request

  • Python Security Announcement

  • OpenWall OSS-Security Thread

  • NetApp Security Advisory
  • Related CVEs
  • CVE-2025-13836: Python Python DOS Vulnerability

  • CVE-2026-0994: Google Protobuf Python DoS Vulnerability

  • CVE-2025-8194: CPython tarfile Module DoS Vulnerability

  • CVE-2024-8088: CPython zipfile.Path DOS Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English