The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
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
    • 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-2025-13836

CVE-2025-13836: Python Python DOS Vulnerability

CVE-2025-13836 is a denial of service vulnerability in Python Python where malicious servers can exploit HTTP response reading to cause memory exhaustion. This article covers technical details, affected versions, and mitigation.

Updated: March 12, 2026

CVE-2025-13836 Overview

CVE-2025-13836 is a Denial of Service vulnerability affecting Python's http.client module. When reading an HTTP response from a server without specifying a read amount, the default behavior uses the Content-Length header value. This design flaw allows a malicious server to send a response with an extremely large Content-Length value, causing the client to attempt allocating massive amounts of memory. The resulting memory exhaustion can lead to Out of Memory (OOM) conditions, system instability, or complete denial of service.

Critical Impact

A malicious server can cause Python HTTP clients to allocate arbitrary amounts of memory, potentially crashing applications, containers, or entire systems through memory exhaustion.

Affected Products

  • Python versions prior to patched releases
  • Python 3.14.0 (pre-release)
  • Python 3.15.0 alpha1 and alpha2

Discovery Timeline

  • 2025-12-01 - CVE-2025-13836 published to NVD
  • 2026-02-10 - Last updated in NVD database

Technical Details for CVE-2025-13836

Vulnerability Analysis

This vulnerability (CWE-400: Uncontrolled Resource Consumption) exists in Python's http.client module due to how HTTP response bodies are read. When a Python application makes an HTTP request and reads the response without explicitly specifying a maximum read size, the module trusts the Content-Length header provided by the server. A malicious server can exploit this by returning an HTTP response with an arbitrarily large Content-Length value, such as several gigabytes or terabytes. The client will then attempt to allocate a buffer of that size in memory before reading the response data.

The impact extends beyond simple application crashes. In containerized environments, this can lead to OOM-killed containers affecting service availability. On shared systems, the memory pressure can impact other processes and potentially cause system-wide instability.

Root Cause

The root cause lies in the absence of a maximum buffer size limit when reading HTTP response data. The http.client module would directly use the Content-Length header value to determine how much memory to allocate for the response buffer. Without a sanity check or chunked reading mechanism for large responses, the module was vulnerable to malicious Content-Length values that exceeded available system memory.

Attack Vector

The attack requires a network-accessible malicious server that a Python client connects to. An attacker controlling such a server can respond to any HTTP request with a crafted response containing an extremely large Content-Length header. When the victim's Python application attempts to read the response body, it will try to allocate memory matching that Content-Length value, triggering memory exhaustion.

python
# Security patch from Lib/http/client.py
# Source: https://github.com/python/cpython/commit/14b1fdb0a94b96f86fc7b86671ea9582b8676628

 _MAXLINE = 65536
 _MAXHEADERS = 100
 
+# Data larger than this will be read in chunks, to prevent extreme
+# overallocation.
+_MIN_READ_BUF_SIZE = 1 << 20
+
+
 # Header name/value ABNF (http://tools.ietf.org/html/rfc7230#section-3.2)
 #
 # VCHAR          = %x21-7E

The fix introduces _MIN_READ_BUF_SIZE constant set to 1MB (1 << 20), which ensures that data larger than this threshold is read in chunks rather than allocated all at once, preventing extreme memory overallocation.

Detection Methods for CVE-2025-13836

Indicators of Compromise

  • Abnormal memory growth in Python processes during HTTP client operations
  • OOM (Out of Memory) events or process crashes coinciding with outbound HTTP requests
  • Python applications receiving HTTP responses with unusually large Content-Length headers
  • System logs showing memory exhaustion events correlated with network activity

Detection Strategies

  • Monitor Python process memory consumption for sudden spikes during HTTP operations
  • Implement network-level inspection to flag HTTP responses with Content-Length values exceeding reasonable thresholds
  • Review application logs for MemoryError exceptions in code paths involving http.client or libraries built on it (such as urllib)
  • Deploy runtime application security monitoring to detect anomalous memory allocation patterns

Monitoring Recommendations

  • Configure memory limits and alerting for Python applications making outbound HTTP requests
  • Implement container resource limits to prevent single-application memory exhaustion from affecting the host
  • Monitor for connections to untrusted or suspicious servers that may be attempting this attack
  • Enable detailed logging for HTTP client operations to aid post-incident analysis

How to Mitigate CVE-2025-13836

Immediate Actions Required

  • Update Python to the latest patched version for your release branch
  • Review applications that connect to untrusted or user-controlled HTTP servers
  • Implement memory limits on Python processes and containers as a defense-in-depth measure
  • Consider adding application-level validation of Content-Length headers before reading responses

Patch Information

Python has released security patches for multiple version branches addressing this vulnerability. The fix introduces chunked reading for large responses to prevent extreme memory overallocation. Patches are available through the following commits:

  • Python 3.12 Patch
  • Python 3.13 Patch
  • Python 3.14 Patch

For full details, see the GitHub CPython Issue Discussion and the Python Security Announcement.

Workarounds

  • Explicitly specify maximum read sizes when calling response read methods
  • Implement wrapper functions that validate Content-Length before reading response bodies
  • Use network-level controls to limit maximum response sizes from untrusted servers
  • Deploy reverse proxies or WAFs that can filter responses with abnormally large Content-Length headers
bash
# Configuration example: Container memory limits as defense-in-depth
# Docker memory limit
docker run --memory="512m" --memory-swap="512m" your-python-app

# Kubernetes resource limits in deployment spec
# resources:
#   limits:
#     memory: "512Mi"
#   requests:
#     memory: "256Mi"

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

  • Vulnerability Details
  • TypeDOS

  • Vendor/TechPython

  • SeverityMEDIUM

  • CVSS Score6.3

  • EPSS Probability0.15%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:L/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
  • AvailabilityLow
  • CWE References
  • CWE-400
  • Vendor Resources
  • GitHub CPython Commit Update

  • GitHub CPython Commit Fix

  • GitHub CPython Commit Change

  • GitHub CPython Commit Improvement

  • GitHub CPython Commit Patch

  • GitHub CPython Commit Refactor

  • GitHub CPython Issue Discussion

  • GitHub CPython Pull Request

  • Python Security Announcement Thread
  • Related CVEs
  • CVE-2026-0994: Google Protobuf Python DoS Vulnerability

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

  • CVE-2024-8088: CPython zipfile.Path DOS Vulnerability

  • CVE-2024-7592: Python CPython DOS Vulnerability
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