CVE-2025-32873
Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.
NVD · uneditedAn issue was discovered in Django 4.2 before 4.2.21, 5.1 before 5.1.9, and 5.2 before 5.2.1. The django.utils.html.strip_tags() function is vulnerable to a potential denial-of-service (slow performance) when processing inputs containing large sequences of incomplete HTML tags. The template filter striptags is also vulnerable, because it is built on top of strip_tags().
Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.
dbcve analysis · high confidenceThe django.utils.html.strip_tags() function and the striptags template filter are vulnerable to denial-of-service through slow performance when processing inputs with large sequences of incomplete HTML tags, allowing attackers to cause excessive processing time.
Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.
Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.
NVD · CPE data>= 4.2.0, < 4.2.21>= 5.1, < 5.1.9= 5.2CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.
From the vector- Attack vector
- Network
- Complexity
- Low
- Privileges
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- None
- Integrity
- None
- Availability
- Low
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.
dbcve checksWork through these to decide whether this CVE applies to you.
-
Identify installed Django versionRun 'python -c "import django; print(django.get_version())"' or check your requirements.txt / Pipfile.lockAffected if Version is 4.2.0-4.2.20, 5.1.0-5.1.8, or 5.2.0 (exact)
-
Find usage of strip_tags in codeSearch codebase for 'from django.utils.html import strip_tags' or 'strip_tags(' pattern using grep or IDE searchAffected if Your code imports or calls strip_tags function
-
Find usage of striptags template filterSearch template files (.html) for '|striptags' filter usage, for example '{{ some_var|striptags }}'Affected if Any Django templates use the striptags filter on user-controlled or external input
-
Identify data flow to vulnerable functionsTrace where strip_tags or striptags processes input - check if input comes from user requests, API calls, or external sourcesAffected if The functions process data that could contain maliciously crafted incomplete HTML tags
You are affected if your Django version falls in the vulnerable range AND your application uses strip_tags or striptags on content that could contain attacker-supplied incomplete HTML tag sequences.
Generated from the published advisory. Verify against your own configuration.
Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.
dbcve · scoped4.2.215.1.9
Upgrade Django to version 4.2.21, 5.1.9, or 5.2.1 or later to receive the performance fix, and consider implementing input validation or length limits on content processed by strip_tags/striptags as a defense-in-depth measure.
Django 4.2.21, 5.1.9, or 5.2.1 (depending on your current branch)
- 1. Identify the current Django version in use by checking requirements.txt, pyproject.toml, or running 'django-admin --version'
- 2. Determine which Django branch is in use (4.2.x, 5.1.x, or 5.2.x) to select the appropriate upgrade target
- 3. For Django 4.2.x: Upgrade to version 4.2.21 or later
- 4. For Django 5.1.x: Upgrade to version 5.1.9 or later
- 5. For Django 5.2.x: Upgrade to version 5.2.1 or later
- 6. Update the Django dependency in requirements.txt or pyproject.toml with the appropriate version (e.g., 'Django>=4.2.21,<5.0' or 'Django>=5.1.9,<5.2' or 'Django>=5.2.1')
- 7. Run 'pip install -r requirements.txt' or 'pip install Django==<fixed_version>' to install the updated package
- 8. Run Django tests, especially any tests that use the striptags template filter or strip_tags() function, to verify the fix works correctly
Generated from the published advisory — verify against the referenced sources before acting.
- Consultation3.0 h
- Implementation4.0 h
- Testing4.0 h
- Review / QA2.0 h
An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $3,648.
Scan for this in your stack
Free · runs locallyCheck whether your project pulls in CVE-2025-32873 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.
References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.
Primary sourcesPractitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2025-32873 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
No notes yet
Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.
A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.
- Verified mitigations, workarounds, and config changes
- Version or environment caveats, and links to real fixes
- No weaponised exploit code, or anything meant to cause harm
- No spam, self-promotion, credentials, or personal data