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-2026-40347

CVE-2026-40347: Python-Multipart DOS Vulnerability

CVE-2026-40347 is a denial of service vulnerability in Python-Multipart that allows attackers to crash services via crafted multipart/form-data requests. This article covers technical details, affected versions, and mitigation.

Published: April 23, 2026

CVE-2026-40347 Overview

Python-Multipart is a streaming multipart parser for Python commonly used in web frameworks like FastAPI and Starlette. Versions prior to 0.0.26 contain a denial of service vulnerability that can be triggered when parsing crafted multipart/form-data requests containing large preamble or epilogue sections. This vulnerability allows remote attackers to exhaust server resources by sending malicious multipart requests, potentially causing service disruption for legitimate users.

Critical Impact

Remote attackers can cause denial of service by sending specially crafted multipart/form-data requests with oversized preamble or epilogue sections, leading to resource exhaustion and service unavailability.

Affected Products

  • Python-Multipart versions prior to 0.0.26
  • Web applications using vulnerable Python-Multipart versions for multipart parsing
  • FastAPI and Starlette applications with vulnerable Python-Multipart dependencies

Discovery Timeline

  • 2026-04-18 - CVE CVE-2026-40347 published to NVD
  • 2026-04-20 - Last updated in NVD database

Technical Details for CVE-2026-40347

Vulnerability Analysis

This vulnerability is classified as CWE-400 (Uncontrolled Resource Consumption). The flaw exists in how Python-Multipart processes multipart/form-data requests, specifically in the handling of preamble and epilogue sections. When a crafted request contains abnormally large preamble data (content before the first boundary) or epilogue data (content after the closing boundary), the parser inefficiently processes this data, consuming excessive CPU cycles and memory resources.

The vulnerability can be exploited remotely over the network without requiring any authentication or user interaction. While the impact is limited to availability (denial of service) without affecting confidentiality or integrity, it poses a significant risk to production environments where Python-Multipart is used for file uploads and form processing.

Root Cause

The root cause lies in the parser's inefficient handling of leading CR/LF (carriage return/line feed) data and epilogue content. Prior to the fix, the parser would process each byte of preamble data sequentially when searching for boundary markers, and would continue processing epilogue data after the closing boundary instead of immediately discarding it. This allowed attackers to force the parser into expensive processing loops by crafting requests with megabytes of preamble or epilogue content.

Attack Vector

An attacker can exploit this vulnerability by sending HTTP POST requests with multipart/form-data content type containing:

  1. Large preamble sections: Excessive data placed before the first boundary marker
  2. Large epilogue sections: Excessive data placed after the closing boundary marker
  3. Malformed CR/LF sequences: Sequences designed to maximize processing overhead

The attack can be executed remotely over the network and requires no authentication, making it accessible to anonymous attackers targeting any exposed endpoint that processes multipart form data.

The vulnerability manifests in the boundary detection and content processing logic of the multipart parser. When processing incoming multipart data, the parser searches for boundary markers sequentially. Malicious requests exploit this by including large amounts of data before the first boundary (preamble) or after the final boundary (epilogue), forcing the parser to process unnecessary data. For detailed technical information, see the GitHub Security Advisory GHSA-mj87-hwqh-73pj.

Detection Methods for CVE-2026-40347

Indicators of Compromise

  • Unusual spikes in CPU and memory usage on web servers processing multipart requests
  • Abnormally large HTTP POST requests with multipart/form-data content type
  • Web application timeouts or slow response times specifically on file upload endpoints
  • Increased error rates or connection resets during form submission handling

Detection Strategies

  • Monitor web server logs for POST requests with Content-Type: multipart/form-data and unusually large Content-Length headers
  • Implement application performance monitoring (APM) to detect resource exhaustion patterns during multipart parsing
  • Configure web application firewalls (WAF) to flag or block multipart requests exceeding reasonable size thresholds
  • Use dependency scanning tools to identify Python-Multipart versions below 0.0.26 in your application dependencies

Monitoring Recommendations

  • Set up alerts for sustained high CPU usage on application servers handling file uploads
  • Monitor request duration metrics for endpoints that process multipart form data
  • Track memory allocation patterns for processes handling multipart parsing
  • Implement rate limiting on endpoints that accept multipart/form-data submissions

How to Mitigate CVE-2026-40347

Immediate Actions Required

  • Upgrade Python-Multipart to version 0.0.26 or later immediately
  • Review all applications using Python-Multipart and update their dependencies
  • Implement request size limits at the web server or reverse proxy level as an additional safeguard
  • Consider implementing rate limiting on file upload endpoints to reduce attack surface

Patch Information

The vulnerability has been addressed in Python-Multipart version 0.0.26. The fix implements two key improvements:

  1. Optimized preamble handling: The parser now skips ahead to the next boundary candidate when processing leading CR/LF data, rather than processing each byte sequentially
  2. Immediate epilogue discard: The parser immediately discards epilogue data after encountering the closing boundary, preventing resource consumption from trailing content

Upgrade using pip:

bash
pip install python-multipart>=0.0.26

For more information, see the GitHub Release 0.0.26 and the GitHub Security Advisory GHSA-mj87-hwqh-73pj.

Workarounds

  • Implement strict request size limits at the reverse proxy or web server level (e.g., nginx client_max_body_size)
  • Configure timeouts for multipart request processing to prevent long-running parse operations
  • Use a web application firewall to inspect and limit multipart request structure
  • Implement rate limiting on endpoints that accept file uploads or form submissions
bash
# Nginx configuration example for request size limits
# Add to server or location block
client_max_body_size 10m;
client_body_timeout 60s;

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

  • Vulnerability Details
  • TypeDOS

  • Vendor/TechPython Multipart

  • SeverityMEDIUM

  • CVSS Score5.3

  • EPSS Probability0.02%

  • 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-400
  • Technical References
  • GitHub Release 0.0.26

  • GitHub Security Advisory GHSA-mj87-hwqh-73pj
  • Related CVEs
  • CVE-2024-53981: python-multipart 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