Skip to main content
VulnerabilityPublished Updated

CVE-2024-27351: django · ReDoS

Affects djangoSource CVE Database V5

0

Mentioned vulnerabilities

Not known to be exploited · CVSS 5.3 Medium · fixed in 5.0.3 : update django when convenient.

Data as of 26 Oct 2026, 12:54 UTC

CVSS 3.1 base score
5.3Medium
How severe the flaw is on the 0–10 CVSS scale.
EPSS
1.8% chance of exploitation in 30 days – higher than 79% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
Patch
Available – fixed in 5.0.3, 5.0, 4.2.11 +2
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:N/A:H

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 15 Mar 2024

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponised: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 26 Oct 2026.

What to do

Upgrade to a fixed release listed under Affected software.

Affected software

ProductAffectedFixed in
PyPIdjangopkg:pypi/djangoOther threatsAffected
  • <3.2.25
  • >=3.2 <4.0
  • <4.2.11
  • >=4.2 <5.0
  • <5.0.3
Fixed in
  • 3.2.25
  • 4.0
  • 4.2.11
  • 5.0
  • 5.0.3

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

The most effective mitigation is to upgrade Django to versions 3.2.25, 4.2.11, or 5.0.3 or later, where the vulnerability is fully addressed. Organizations should audit their codebases to identify usage of django.utils.text.Truncator.words() with html=true and the truncatewords_html template filter, especially in contexts processing untrusted input. Input validation and sanitization should be enhanced to reject or safely handle suspiciously crafted strings that might trigger ReDoS. Implementing web application firewalls (WAFs) with rules to detect and block malicious payloads targeting regular expression engines can provide additional protection. Monitoring application performance metrics and logs for unusual CPU spikes or slowdowns can help detect exploitation attempts early. For critical services, consider rate limiting and user interaction controls to reduce exposure. Finally, educating developers about secure use of regular expressions and avoiding complex patterns on untrusted input is recommended to prevent similar issues.

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.

References

Community reviews

Loading reviews…