Skip to content
Fencer Vulns
medium 5.3

CVE-2024-27351 json

Regular expression denial-of-service in Django

published 2024-03-15 2 y ago modified 2026-09-10 59 d ago also BIT-django-2024-27351 , EUVD-2024-0039 , GHSA-vm8q-m57g-pff3 , PYSEC-2024-47

cvss
5.3
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
1.9%
EPSS 1.9% chance of exploitation in 30 days, percentile 79%
public exploits
0
none known

Summary

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.

Patch / fix

  • pypi django 3.2.25, 4.2.11, 5.0.3
  • bitnami django 3.2.25, 4.2.11, 5.0.3
  • django-rest-framework django_rest_framework 5.0.3
  • python-django Debian 12 3:3.2.25-0+deb12u1
  • python-django Debian 14, Debian 13 3:4.2.11-1

debian advisories DEBIAN-CVE-2024-27351

  • python-django Ubuntu 20.04 LTS 2:2.2.12-1ubuntu0.22
  • python-django Ubuntu 22.04 LTS 2:3.2.12-2ubuntu1.11
  • python-django Ubuntu 24.04 LTS 3:4.2.11-1
  • python-django Ubuntu Pro 18.04 LTS 1:1.11.11-1ubuntu1.21+esm4

ubuntu advisories UBUNTU-CVE-2024-27351

Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • python-django openstack 17.1 2.2.24-9.el9ost
  • python3-django openstack 17.1 2.2.24-9.el9ost
  • receptor ansible automation platform inside 2.4, ansible automation platform developer 2.4, ansible automation platform 2.4 1.4.8-1.el8ap
  • receptor ansible automation platform inside 2.4, ansible automation platform developer 2.4, ansible automation platform 2.4 1.4.8-1.el9ap
  • python-idna ansible automation platform developer 2.4, ansible automation platform 2.4 3.7-1.el9ap
  • receptorctl ansible automation platform inside 2.4, ansible automation platform developer 2.4, ansible automation platform 2.4 1.4.8-1.el8ap
  • receptorctl ansible automation platform inside 2.4, ansible automation platform developer 2.4, ansible automation platform 2.4 1.4.8-1.el9ap
  • python-black ansible automation platform inside 2.4, ansible automation platform developer 2.4, ansible automation platform 2.4 22.8.0-2.el9ap

red hat advisories RHSA-2025:4187RHSA-2024:3781RHSA-2024:1640RHSA-2024:5662RHSA-2024:1878

  • python-Django OpenStack Cloud Crowbar 8, OpenStack Cloud 8, HPE Helion OpenStack 8 1.11.29-3.62.1
  • venv-openstack-horizon OpenStack Cloud 8 12.0.5~dev6-14.56.1
  • venv-openstack-horizon-hpe HPE Helion OpenStack 8 12.0.5~dev6-14.56.1
  • python-Django1 OpenStack Cloud Crowbar 9, OpenStack Cloud 9 1.11.29-3.61.1
  • venv-openstack-horizon OpenStack Cloud 9 14.1.1~dev11-4.53.1
  • python-Django openSUSE Leap 15.5 2.0.7-150000.1.17.1
  • python-Django OpenStack Cloud Crowbar 8, OpenStack Cloud 8, HPE Helion OpenStack 8 1.11.29-3.59.3
  • venv-openstack-horizon OpenStack Cloud 8 12.0.5~dev6-14.54.5

suse advisories SUSE-SU-2024:1141-1SUSE-SU-2024:1140-1SUSE-SU-2024:0902-1SUSE-SU-2024:0875-1SUSE-SU-2024:0874-1

  • python-Django5 openSUSE Tumbleweed 5.2.16-1.1
  • python-Django openSUSE Tumbleweed 5.2.16-1.1
  • python-Django4 openSUSE Tumbleweed 4.2.30-4.1
  • python-Django6 openSUSE Tumbleweed 6.0-1.1
  • python-Django4 openSUSE Tumbleweed 4.2.14-1.1
  • python-Django openSUSE Tumbleweed 4.2.11-1.1
  • python-Django1 Package Hub 15 SP5, openSUSE Leap 15.5 1.11.29-bp155.4.9.1
  • python-Django Package Hub 15 SP5, openSUSE Leap 15.5 2.2.28-bp155.7.9.1

opensuse advisories openSUSE-SU-2026:11270-1openSUSE-SU-2026:11248-1openSUSE-SU-2026:11235-1openSUSE-SU-2026:10005-1openSUSE-SU-2024:14208-1openSUSE-SU-2024:13749-1

  • py3-django Alpine 3.24, Alpine 3.23, Alpine 3.22 +2 more 4.2.11-r0

alpine advisories ALPINE-CVE-2024-27351

Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2024-27351 updated cvss 7.5

python-django: Potential regular expression denial-of-service in django.utils.text.Truncator.words()

  • Red Hat Certification for Red Hat Enterprise Linux 7 python-django
    affected: no fix planned “Out of support scope”
  • Red Hat Certification for Red Hat Enterprise Linux 8 redhat-certification Red Hat Certification Program for Red Hat Enterprise Linux 9 redhat-certification
    affected: no fix available “Fix deferred”
  • Red Hat OpenStack Platform 16.1 python-django20, python3-django20, python-django20-bash-completion
    affected: no fix planned “Out of support scope”
  • Red Hat OpenStack Platform 16.2 python-django20, python3-django20, python-django20-bash-completion
    affected: no fix planned “Will not fix”
  • Red Hat OpenStack Platform 18.0 python-django
    affected: no fix available
  • Red Hat Storage 3 python-django, python2-django, python-django-bash-completion
    affected: no fix planned “Out of support scope”
  • Red Hat Ansible Automation Platform 2.4 for RHEL 8 python39-django 4.2.11-1.el8ap, python3x-django 4.2.11-1.el8ap, automation-controller-venv-tower 4.5.7-1.el8ap Red Hat Ansible Automation Platform 2.4 for RHEL 9 python-django 4.2.11-1.el9ap, python3-django 4.2.11-1.el9ap, automation-controller-venv-tower 4.5.7-1.el9ap
    fixed: vendor fix RHSA-2024:3781
  • Red Hat OpenStack Platform 17.1 python-django 2.2.24-9.el9ost, python3-django 2.2.24-9.el9ost
    fixed: vendor fix RHSA-2025:4187
show 3 more
  • Red Hat Satellite 6.15 for RHEL 8 python-django 4.2.14-1.el8pc, python3.11-django 4.2.14-1.el8pc
    fixed: vendor fix RHSA-2024:5662
  • Red Hat RHUI 4 for RHEL 8 python-django 4.2.11-1.el8ui, python3.11-django 4.2.11-1.el8ui
    fixed: vendor fix RHSA-2024:1878
  • Red Hat Ansible Automation Platform 1.2 ansible-tower Red Hat Ansible Automation Platform 2.4 for RHEL 8 receptor 1.4.5-1.el8ap, receptor 1.4.8-1.el8ap, python39-idna 3.7-1.el8ap, python3x-idna 3.7-1.el8ap, receptorctl 1.4.5-1.el8ap, receptorctl 1.4.8-1.el8ap, +53 more Red Hat Ansible Automation Platform 2.4 for RHEL 9 receptor 1.4.5-1.el9ap, receptor 1.4.8-1.el9ap, python-idna 3.7-1.el9ap, python3-idna 3.7-1.el9ap, receptorctl 1.4.5-1.el9ap, receptorctl 1.4.8-1.el9ap, +53 more Red Hat Discovery 1 discovery-server-container Red Hat Satellite 6.15 for RHEL 8 libcomps 0.1.21-1.el8pc, foreman 3.9.1.9-1.el8sat, satellite 6.15.3-1.el8sat, python-jinja2 3.1.4-1.el8pc, foreman-cli 3.9.1.9-1.el8sat, foreman-ec2 3.9.1.9-1.el8sat, +31 more Red Hat RHUI 4 for RHEL 8 libsolv 0.7.22-6.el8ui, libcomps 0.1.18-8.el8ui, python-jq 1.6.0-3.el8ui, python-xlrd 2.0.1-8.el8ui, python-xlwt 1.3.0-6.el8ui, python-yarl 1.8.2-4.el8ui, +201 more
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

CISA SSVC

Exploitation
none
Automatable
no
Technical impact
partial
Assessed
2 y ago

Exploit prediction

1.85% chance of exploitation in the next 30 days, higher than 79% of all scored CVEs (FIRST EPSS, 2026-11-08).

CVSS scores

assigned by version score vector
CISA ADP 3.1 5.3 CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:N/A:H
GitHub 3.1 5.3 CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:N/A:H
CNA 3.1 5.3 CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:N/A:H
OSV 3.1 5.3 CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:N/A:H

Affected packages

ecosystem package affected fixed in
pypi django
>=3.2, <3.2.25
>=4.2, <4.2.11
>=5.0, <5.0.3
3.2.25
4.2.11
5.0.3
bitnami django
>=3.2.0, <3.2.25
>=4.2.0, <4.2.11
>=5.0.0, <5.0.3
3.2.25
4.2.11
5.0.3

Affected products

  • django-rest-framework django_rest_framework

Classification

Weakness
  • CWE-1333 Inefficient Regular Expression Complexity
Technology feeds

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.

CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.