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

CVE-2025-32873: Django strip_tags() DoS Vulnerability

CVE-2025-32873 is a denial-of-service vulnerability in Django's strip_tags() function that causes slow performance with incomplete HTML tags. This post covers the technical details, affected versions, and mitigation.

Updated: January 22, 2026

CVE-2025-32873 Overview

CVE-2025-32873 is a denial-of-service vulnerability affecting the Django web framework. The django.utils.html.strip_tags() function exhibits slow performance when processing inputs containing large sequences of incomplete HTML tags. This algorithmic complexity issue also affects the striptags template filter, which is built on top of strip_tags(). Attackers can exploit this vulnerability by sending specially crafted input to web applications using these functions, potentially causing service degradation or unavailability.

Critical Impact

Applications using strip_tags() or the striptags template filter may experience significant performance degradation when processing malicious input containing large sequences of incomplete HTML tags, leading to denial of service conditions.

Affected Products

  • Django 4.2 before 4.2.21
  • Django 5.1 before 5.1.9
  • Django 5.2 before 5.2.1

Discovery Timeline

  • May 7, 2025 - Django releases security patch
  • May 8, 2025 - CVE-2025-32873 published to NVD
  • September 2, 2025 - Last updated in NVD database

Technical Details for CVE-2025-32873

Vulnerability Analysis

This vulnerability is classified under CWE-770 (Allocation of Resources Without Limits or Throttling). The strip_tags() function in Django's HTML utilities is designed to remove HTML tags from text content, providing a security mechanism to sanitize user input. However, the implementation contains an algorithmic inefficiency that manifests when parsing malformed HTML containing incomplete tag sequences.

When the function encounters input with many unclosed or incomplete HTML tags, the parsing algorithm enters a computationally expensive state. This creates an asymmetric resource consumption scenario where a relatively small malicious payload can consume disproportionate server resources, making it an attractive vector for denial-of-service attacks.

The vulnerability extends to the striptags template filter, as it relies on the underlying strip_tags() function. This means any Django template using {{ variable|striptags }} syntax is potentially vulnerable if the variable contains user-controlled content.

Root Cause

The root cause lies in the algorithmic handling of incomplete HTML tag sequences within strip_tags(). When processing strings with numerous incomplete tags (such as many opening angle brackets without corresponding closing brackets), the function's internal state machine operates inefficiently, resulting in exponential or polynomial time complexity relative to input size. This is a classic example of algorithmic complexity vulnerability where the worst-case performance significantly exceeds average-case performance.

Attack Vector

The attack can be executed remotely over the network without authentication. An attacker would identify entry points where user input is processed by strip_tags() or rendered through templates using the striptags filter. By submitting carefully crafted payloads containing large sequences of incomplete HTML tags, an attacker can force the server to expend excessive CPU cycles processing the malicious input.

Common attack surfaces include:

  • Form fields where HTML is stripped before storage or display
  • API endpoints that sanitize HTML content
  • Comment systems or user-generated content platforms
  • Any template rendering user input with the striptags filter

The attack does not require user interaction and can be automated to overwhelm server resources through repeated requests.

Detection Methods for CVE-2025-32873

Indicators of Compromise

  • Sudden increases in CPU utilization on Django application servers
  • HTTP requests with unusually large payloads containing repetitive incomplete HTML patterns (e.g., sequences of < characters)
  • Application timeouts or slow response times correlated with specific request patterns
  • Log entries showing extended request processing times for specific endpoints

Detection Strategies

  • Implement request rate limiting and payload size validation at the web application firewall level
  • Monitor application performance metrics for anomalous CPU spikes during request processing
  • Audit code for usage of strip_tags() and striptags template filter with user-controlled input
  • Deploy application performance monitoring (APM) to identify slow transaction patterns

Monitoring Recommendations

  • Configure alerts for CPU utilization thresholds on Django application servers
  • Monitor request processing time distributions and alert on statistical outliers
  • Track request payload sizes and flag requests with unusual character patterns
  • Implement logging around strip_tags() calls to capture processing duration

How to Mitigate CVE-2025-32873

Immediate Actions Required

  • Upgrade Django to version 4.2.21, 5.1.9, or 5.2.1 depending on your current version branch
  • Review application code to identify all uses of strip_tags() and striptags template filter
  • Implement input validation to limit the size of content processed by these functions
  • Consider temporary workarounds if immediate patching is not possible

Patch Information

Django has released security patches addressing this vulnerability. Affected users should upgrade to the following versions:

  • Django 4.2.x users: Upgrade to Django 4.2.21 or later
  • Django 5.1.x users: Upgrade to Django 5.1.9 or later
  • Django 5.2.x users: Upgrade to Django 5.2.1 or later

Refer to the Django Security Releases announcement for complete patch details and upgrade instructions. Additional technical information is available through the Django Security Release Notes.

Workarounds

  • Implement strict input length validation before calling strip_tags() to limit maximum input size
  • Use alternative HTML sanitization libraries such as bleach or html-sanitizer that may not share this vulnerability
  • Deploy web application firewall rules to block requests containing suspicious patterns of incomplete HTML tags
  • Implement request timeout configurations to prevent long-running requests from consuming resources indefinitely
bash
# Upgrade Django to patched version
pip install --upgrade Django>=4.2.21  # For Django 4.2.x users
pip install --upgrade Django>=5.1.9   # For Django 5.1.x users
pip install --upgrade Django>=5.2.1   # For Django 5.2.x users

# Verify installed version
python -c "import django; print(django.VERSION)"

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

  • Vulnerability Details
  • TypeDOS

  • Vendor/TechDjango

  • SeverityMEDIUM

  • CVSS Score5.3

  • EPSS Probability0.03%

  • 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
  • Django Security Release Notes

  • Django Announcements Group

  • Openwall OSS-Security Mailing List
  • Vendor Resources
  • Django Weblog Security Updates
  • Related CVEs
  • CVE-2026-33034: Django DOS Vulnerability

  • CVE-2026-33033: Django MultiPartParser DOS Vulnerability

  • CVE-2025-14550: Django ASGIRequest DOS Vulnerability

  • CVE-2026-1285: Djangoproject Django 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