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

CVE-2025-54121: Starlette ASGI Framework DoS Vulnerability

CVE-2025-54121 is a denial of service flaw in Starlette ASGI framework affecting versions 0.47.1 and below. The vulnerability blocks event threads during large file uploads. This article covers technical details, impact, and patches.

Updated: May 15, 2026

CVE-2025-54121 Overview

CVE-2025-54121 affects Starlette, a lightweight Asynchronous Server Gateway Interface (ASGI) framework used to build async web services in Python. Versions 0.47.1 and below contain a flaw in the multipart form upload handler. When the framework parses a file larger than the default spool size, it performs a synchronous disk rollover on the main event loop thread. This blocks the event loop and prevents the application from accepting new connections. The issue is tracked as a resource management flaw [CWE-770] and is fixed in version 0.47.2.

Critical Impact

Remote unauthenticated attackers can stall the ASGI event loop by uploading large multipart files, denying service to all concurrent users of the application.

Affected Products

  • Starlette ASGI framework versions 0.47.1 and below
  • Python web applications using Starlette's UploadFile for multipart form parsing
  • Downstream frameworks built on Starlette, including FastAPI

Discovery Timeline

  • 2025-07-21 - CVE-2025-54121 published to the National Vulnerability Database
  • 2026-04-15 - Last updated in NVD database

Technical Details for CVE-2025-54121

Vulnerability Analysis

Starlette uses Python's SpooledTemporaryFile to buffer multipart upload data. The spool keeps small files entirely in memory and rolls over to disk once the configured threshold is exceeded. The rollover operation performs synchronous file system I/O. Starlette's UploadFile implementation invokes this rollover from coroutine code without offloading it to a worker thread.

When a request body exceeds the spool size, the disk write executes directly on the asyncio event loop. The event loop is single-threaded, so this blocks every other coroutine, including connection acceptors and request handlers. Concurrent users experience stalled responses until the write completes. An attacker who sends multiple large uploads can sustain denial of service against the application.

Root Cause

The bug lives in the UploadFile.write logic inside starlette/datastructures.py. The code branches on whether the file is currently held in memory through the self._in_memory flag. The check does not account for the case where the next chunk will push the cumulative size past the rollover threshold. As a result, the synchronous rollover triggered by SpooledTemporaryFile runs inline on the event loop instead of being dispatched to a thread executor. See the GitHub Security Advisory GHSA-2c2j-9gv5-cj73 for the full advisory text.

Attack Vector

The vulnerability is reachable over the network without authentication or user interaction. Any Starlette endpoint that accepts multipart/form-data uploads is exposed. An attacker submits an HTTP request whose file part exceeds the default spool threshold. The server begins parsing, hits the rollover branch, and blocks the event loop for the duration of the disk write. Repeated or concurrent uploads compound the effect and prevent the server from servicing legitimate traffic.

No proof-of-concept exploit code is required beyond a standard HTTP client capable of sending a large multipart body. Review the vulnerable code in datastructures.py and the fix commit for technical details.

Detection Methods for CVE-2025-54121

Indicators of Compromise

  • Spikes in HTTP request latency or worker timeouts on Starlette or FastAPI services accepting file uploads.
  • Repeated multipart/form-data requests from a single source with content lengths well above the default spool size.
  • ASGI worker processes showing high wall-clock time but low CPU utilization during upload handling.

Detection Strategies

  • Inventory Python applications and identify deployments running Starlette <= 0.47.1 or FastAPI versions that pin a vulnerable Starlette release.
  • Instrument the event loop with asyncio debug mode or middleware that logs coroutines exceeding a latency threshold.
  • Inspect web application firewall and reverse proxy logs for clusters of large multipart POST requests targeting upload endpoints.

Monitoring Recommendations

  • Alert on sustained increases in p95/p99 request latency on endpoints that accept uploads.
  • Track connection queue depth and worker saturation on ASGI servers such as Uvicorn and Hypercorn.
  • Correlate upload size distributions against historical baselines to surface anomalous traffic patterns.

How to Mitigate CVE-2025-54121

Immediate Actions Required

  • Upgrade Starlette to version 0.47.2 or later across all environments.
  • For FastAPI deployments, update to a release that depends on a patched Starlette version, or pin Starlette directly.
  • Audit upload endpoints and enforce maximum request body size limits at the reverse proxy or ingress layer.

Patch Information

The fix landed in Starlette 0.47.2. The patch adjusts the rollover check inside UploadFile to account for the size of the incoming chunk and offloads the rollover to a thread executor when triggered. Review the upstream commit 9f7ec2e and the maintainer's discussion thread for implementation notes.

Workarounds

  • Restrict the maximum request body size at the proxy layer (for example, client_max_body_size in nginx) to a value below the spool threshold.
  • Configure rate limiting on multipart upload endpoints to limit the volume an attacker can submit.
  • Disable or gate upload endpoints with authentication where they are not required for unauthenticated users.
bash
# Pin the fixed Starlette release
pip install "starlette>=0.47.2"

# Verify the installed version
python -c "import starlette; print(starlette.__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.24%

  • 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 History

  • GitHub Discussion Comment

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

  • CVE-2024-47874: Starlette ASGI Framework DoS Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today 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