CVE-2024-27351
JSON

5.3medium

Regular expression denial-of-service in Django

Severity
5.3medium CVSS:3.1 by CISA-ADP
Exploit likelihood
1.85% (higher than 79% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
mitre
Also known as
GHSA-vm8q-m57g-pff3BIT-DJANGO-2024-27351PYSEC-2024-47

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.

Affected

Product or packageVersionsReported by
Unspecified productn/aCVE List
django-rest-framework django_rest_frameworkfrom 5.0 before 5.0.3CVE List
django (PyPI)from 3.2 before 3.2.25, from 4.2 before 4.2.11, from 5.0 before 5.0.3GitHub Advisory Database, PyPA Advisory Database
djangoproject djangofrom 3.2 before 3.2.25, from 4.2 before 4.2.11, from 5.0 before 5.0.3NVD
django (Bitnami)from 3.2.0 before 3.2.25, from 4.2.0 before 4.2.11, from 5.0.0 before 5.0.3Bitnami Vulnerability Database

All scores

CISA-ADP5.3medium CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:N/A:H
GitHub5.3medium CVSS:3.1CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:N/A:H
Bitnami Vulnerability Databasemedium rating

Classification

CWE-1333

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

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.

NVD (es)

En Django 3.2 anterior a 3.2.25, 4.2 anterior a 4.2.11 y 5.0 anterior a 5.0.3, el método django.utils.text.Truncator.words() (con html=True) y el filtro de plantilla truncatewords_html están sujetos a un potencial Ataque de denegación de servicio de expresión regular a través de una cadena manipulada. NOTA: este problema existe debido a una solución incompleta para CVE-2019-14232 y CVE-2023-43665.

References

https://groups.google.com/forum/#%21forum/django-announcepermissions-required, web
https://docs.djangoproject.com/en/5.0/releases/security/advisory, release-notes, vendor-advisory, web
https://www.djangoproject.com/weblog/2024/mar/04/security-releases/advisory, article, vendor-advisory
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/D2JIRXEDP4ZET5KFMAPPYSK663Q52NEX/broken-link, vendor-advisory, web
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/SN2PLJGYSAAG5KUVIUFJYKD3BLQ4OSN6/broken-link, vendor-advisory, web
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ZQJOMNRMVPCN5WMIZ7YSX5LQ7IR2NY4D/broken-link, vendor-advisory, web
http://www.openwall.com/lists/oss-security/2024/03/04/1discussion, mailing-list, web
https://github.com/django/django/commit/3394fc6132436eca89e997083bae9985fb7e761efix, patch, web
https://github.com/django/django/commit/3c9a2771cc80821e041b16eb36c1c37af5349d4afix, patch, web
https://github.com/django/django/commit/072963e4c4d0b3a7a8c5412bc0c7d27d1a9c3521fix, patch, web
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ZQJOMNRMVPCN5WMIZ7YSX5LQ7IR2NY4D/web
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/SN2PLJGYSAAG5KUVIUFJYKD3BLQ4OSN6/web

Sources

SourceRecordLicence
CVE ListCVE-2024-27351 changed 2025-11-04CVE Terms of Use
GitHub Advisory DatabaseGHSA-vm8q-m57g-pff3 changed 2026-09-10CC-BY-4.0
NVDCVE-2024-27351 changed 2026-06-17Public domain
PyPA Advisory DatabasePYSEC-2024-47 changed 2026-06-10CC-BY-4.0
Bitnami Vulnerability DatabaseBIT-DJANGO-2024-27351 changed 2026-09-08Apache-2.0