Advisory

GHSA-2f9x-5v75-3qv4

Also known as: CVE-2018-7537, PYSEC-2018-6

Summary

Django Denial-of-service possibility in truncatechars_html and truncatewords_html template filters

Details

An issue was discovered in Django 2.0 before 2.0.3, 1.11 before 1.11.11, and 1.8 before 1.8.19. If django.utils.text.Truncator's chars() and words() methods were passed the html=True argument, they were extremely slow to evaluate certain inputs due to a catastrophic backtracking vulnerability in a regular expression. The chars() and words() methods are used to implement the truncatechars_html and truncatewords_html template filters, which were thus vulnerable.

Severity

Low Basis: The source's own band: LOW

Dates

Published
2019-01-04 17:50 UTC
Modified
2024-11-27 05:25 UTC

Affected packages and fixes

django

PyPI · All systems

Affected

  • introduced 2.0, fixed 2.0.3 (ecosystem)

Fixed versions

2.0.3

Fix

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

django

PyPI · All systems

Affected

  • introduced 1.11, fixed 1.11.11 (ecosystem)

Fixed versions

1.11.11

Fix

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

django

PyPI · All systems

Affected

  • introduced 1.8, fixed 1.8.19 (ecosystem)

Fixed versions

1.8.19

Fix

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

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