Advisory

GHSA-vm8q-m57g-pff3

Also known as: BIT-django-2024-27351, CVE-2024-27351, PYSEC-2024-47

Summary

Regular expression denial-of-service in Django

Details

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.

Severity

Medium Basis: The source's own band: MODERATE

Dates

Published
2024-03-15 21:30 UTC
Modified
2026-09-10 03:50 UTC

Affected packages and fixes

django

PyPI · All systems

Affected

  • introduced 3.2, fixed 3.2.25 (ecosystem)

Fixed versions

3.2.25

Fix

  • Fixed version 3.2.25
    pip install --upgrade django==3.2.25

django

PyPI · All systems

Affected

  • introduced 4.2, fixed 4.2.11 (ecosystem)

Fixed versions

4.2.11

Fix

  • Fixed version 4.2.11
    pip install --upgrade django==4.2.11

django

PyPI · All systems

Affected

  • introduced 5.0, fixed 5.0.3 (ecosystem)

Fixed versions

5.0.3

Fix

  • Fixed version 5.0.3
    pip install --upgrade django==5.0.3

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences