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-54121

CVE-2025-54121: Starlette ASGI Framework DoS Vulnerability

CVE-2025-54121 is a denial of service flaw in Starlette ASGI framework that blocks the event thread when parsing large multi-part files. This article covers the technical details, affected versions, and mitigation steps.

Updated: January 22, 2026

CVE-2025-54121 Overview

CVE-2025-54121 is a Denial of Service vulnerability affecting Starlette, a lightweight ASGI (Asynchronous Server Gateway Interface) framework/toolkit designed for building async web services in Python. The vulnerability exists in versions 0.47.1 and below, where parsing a multi-part form with large files (greater than the default max spool size) causes Starlette to block the main thread while rolling the file over to disk. This blocking behavior prevents the event loop from processing new connections, effectively rendering the application unavailable.

Critical Impact

Applications using Starlette for file uploads become unresponsive when processing large files, as the main event loop is blocked during disk write operations, preventing all new connection handling.

Affected Products

  • Starlette versions 0.47.1 and below
  • Python applications using Starlette's UploadFile functionality
  • Frameworks built on Starlette (e.g., FastAPI) that handle multi-part form uploads

Discovery Timeline

  • 2025-07-21 - CVE CVE-2025-54121 published to NVD
  • 2025-07-22 - Last updated in NVD database

Technical Details for CVE-2025-54121

Vulnerability Analysis

The vulnerability stems from a logic error in the UploadFile class within Starlette's datastructures.py module. When handling multi-part form uploads, Starlette uses Python's SpooledTemporaryFile to manage file data. Files are initially held in memory, but when they exceed a configurable threshold (_max_size), the data is "rolled over" to disk storage.

The flaw occurs because the UploadFile code only checks whether the current data is in memory (self._in_memory), but fails to evaluate whether incoming additional bytes will trigger a rollover. This synchronous disk write operation blocks the async event loop, which is the core mechanism Python ASGI applications use to handle concurrent connections. During this blocking period, no new connections can be accepted, and existing connections may time out.

Root Cause

The root cause is classified as CWE-770: Allocation of Resources Without Limits or Throttling. The UploadFile implementation performs blocking I/O operations within the async event loop context without checking if pending data will exceed memory thresholds and require disk rollover. The missing preemptive check for future memory usage allows the blocking condition to occur unexpectedly.

Attack Vector

An attacker can exploit this vulnerability remotely over the network without authentication. The attack involves sending crafted multi-part form requests with file uploads sized to trigger the rollover threshold. By timing multiple requests appropriately, an attacker can keep the event loop blocked, causing a sustained denial of service condition. The attack requires minimal complexity and no user interaction.

python
         self.size = size
         self.headers = headers or Headers()
 
+        # Capture max size from SpooledTemporaryFile if one is provided. This slightly speeds up future checks.
+        # Note 0 means unlimited mirroring SpooledTemporaryFile's __init__
+        self._max_mem_size = getattr(self.file, "_max_size", 0)
+
     @property
     def content_type(self) -> str | None:
         return self.headers.get("content-type", None)

Source: GitHub Commit Record

The patch adds preemptive capture of the _max_size attribute from the SpooledTemporaryFile during initialization, enabling future checks to determine if incoming data will cause a rollover before it happens.

Detection Methods for CVE-2025-54121

Indicators of Compromise

  • Application becomes unresponsive during multi-part file upload requests
  • Event loop thread shows high blocking time in application performance monitoring
  • Connection timeouts increase during periods of file upload activity
  • Server logs show request queue buildup with upload-related endpoints

Detection Strategies

  • Monitor async event loop blocking metrics using Python profiling tools like asyncio.get_event_loop().slow_callback_duration
  • Implement application-level health checks that detect event loop starvation
  • Review dependency manifests for Starlette versions <= 0.47.1
  • Use SentinelOne Singularity to detect anomalous resource consumption patterns on application servers

Monitoring Recommendations

  • Configure alerting for sustained connection timeout rates on upload endpoints
  • Monitor Python process thread states for prolonged blocking I/O operations
  • Track the ratio of pending to processed connections during upload operations
  • Deploy application performance monitoring (APM) with async-aware instrumentation

How to Mitigate CVE-2025-54121

Immediate Actions Required

  • Upgrade Starlette to version 0.47.2 or later immediately
  • Audit applications built on Starlette-based frameworks (FastAPI, etc.) and update dependencies
  • Implement rate limiting on file upload endpoints as a temporary protective measure
  • Consider adding a reverse proxy with request timeout configurations

Patch Information

The vulnerability is fixed in Starlette version 0.47.2. The fix modifies the UploadFile class to capture the _max_size attribute from SpooledTemporaryFile during initialization, enabling the code to check if additional incoming bytes will cause a rollover before performing blocking disk operations. Detailed patch information is available in the GitHub Security Advisory and the commit record.

Workarounds

  • Implement upload size limits at the reverse proxy or load balancer level to reduce large file exposure
  • Use an external file upload service that handles file processing outside the main application event loop
  • Deploy request queuing with worker processes separate from the ASGI event loop
  • Configure aggressive connection and request timeouts to minimize blocking impact
bash
# Configuration example: Update Starlette via pip
pip install --upgrade starlette>=0.47.2

# Verify installed version
pip show starlette | grep Version

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

  • Vulnerability Details
  • TypeDOS

  • Vendor/TechStarlette

  • SeverityMEDIUM

  • CVSS Score5.3

  • EPSS Probability0.13%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityLow
  • CWE References
  • CWE-770
  • Technical References
  • GitHub Code Blob

  • GitHub Commit Record

  • GitHub Discussion Comment

  • GitHub Security Advisory
  • Related CVEs
  • CVE-2025-62727: Starlette ASGI Framework DoS Vulnerability

  • CVE-2024-47874: Starlette ASGI Framework 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