CVE-2024-27351
Djangoproject Django 3.2 – 3.2.25
Raw vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:N/A:HCVSS and EPSS are reproduced from their sources (NVD, FIRST EPSS). EPSS, Forum of Incident Response and Security Teams (FIRST), epss.first.org. Risk Priority is our own derived reading, not an NVD score.
Summary
CVE-2024-27351 is a medium-severity Inefficient Regular Expression Complexity (CWE-1333) vulnerability in Djangoproject Django. Its CVSS base score is 5.3 (Medium).
Operationally, exploitation aligns with the MITRE ATT&CK technique Endpoint Denial of Service (T1499); ranked in the top 20% of CVEs by exploit likelihood; it is not currently listed in the CISA KEV catalog.
The strongest mitigations our analysis identified map to SA-11 (Developer Testing and Evaluation) and SA-15 (Development Process, Standards, and Tools) — see the control section below for these in your framework.
EU & UK References
- 🇪🇺 ENISA EUVD: EUVD-2024-0039
Vulnerability Data
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…
more
of an incomplete fix for CVE-2019-14232 and CVE-2023-43665.
- CWE(s)
Related Threats
MITRE ATT&CK Enterprise Techniques
MITRE ATT&CK v20.0
CVEs Like This One
Affected Assets
Mitigating Controls
Mitigating Controls (NIST 800-53 r5)
Our mappings, made for this CVE.
Developer testing and evaluation can discover inefficient regex patterns via performance or static analysis.
Development standards and tools can require safe regex construction and forbid known exponential patterns.
Denial-of-service protections limit resource exhaustion caused by expensive regex evaluation.
Input validation can constrain data that would otherwise trigger worst-case regex complexity.
Mitigating Controls (NIST CSF 2.0)
Our mappings, derived directly from the weakness types (CWEs) cited in the NVD entry via our CWE→CSF cross-walk — links open the control.
Mitigating Controls (ISO/IEC 27001:2022 Annex A)
Our mappings, derived directly from the weakness types (CWEs) cited in the NVD entry via our CWE→ISO cross-walk — links open the control.
Security testing can detect and reject regex patterns with exponential worst-case complexity.
Training can teach developers about regex backtracking risks and safer patterns, but CWE-1333 is a subtle implementation defect requiring specialized knowledge; most instances arise from developers who either were not trained on this topic or did not retain the guidance, leaving a majority of cases unaffected.
Secure coding standards explicitly prohibit or limit the use of inefficient regular expressions.
A.8.30 carries its effect through the secure-coding practices (8.25-8.29) its contract requires of the supplier, so a well-implemented clause reduces ReDoS instances the way those practices do; the clause's declared ceiling on this verb is `partial`, and the effect depends on supplier implementation of the mandated practices.
A.8.8's reach is DISCLOSURE: it finds ReDoS only where a vendor has published an advisory (third-party libraries tracked under 8.8(f)), and the disclosed share of this class is a minority — most inefficient regex complexity lives in first-party code that no advisory names.