NewApp Monitoring is liveSign up free
AgentbeamBeta
Open-source package vulnerability · PyPI

CVE-2024-27351: Regular expression denial-of-service in Django

mediumCVSS 3.1 5.3GHSA-vm8q-m57g-pff3

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 truncatewordshtml 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.

Published Mar 15, 2024 · Updated Nov 4, 2025

Affected packages

django

Ecosystem
PyPI
Affected
>= 3.2, < 3.2.25
Fixed in
3.2.25
Check
pip show django

django

Ecosystem
PyPI
Affected
>= 4.2, < 4.2.11
Fixed in
4.2.11
Check
pip show django

django

Ecosystem
PyPI
Affected
>= 5.0, < 5.0.3
Fixed in
5.0.3
Check
pip show django

Advisory details

From the GitHub Advisory Database (CC BY 4.0).

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.

Credited to MarkLee131.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology

More PyPI vulnerabilities

All PyPI entries