![]() |
|
Message-ID: <CAJVoTUvXRrX8=Y-MhwgVELfGwtmbVZgMSqNqk1-u6j-r+Od1aQ@mail.gmail.com> Date: Wed, 7 May 2025 11:48:45 -0300 From: Natalia Bidart <nataliabidart@...ngoproject.com> To: oss-security@...ts.openwall.com Cc: Django Security Team <security@...ngoproject.com> Subject: CVE-2025-32873: Django: Denial-of-service possibility in strip_tags() * Announce link: https://www.djangoproject.com/weblog/2025/may/07/security-releases/ * Announce content: In accordance with `our security release policy <https://docs.djangoproject.com/en/dev/internals/security/>`_, the Django team is issuing releases for `Django 5.2.1 <https://docs.djangoproject.com/en/dev/releases/5.2.1/>`_, `Django 5.1.9 <https://docs.djangoproject.com/en/dev/releases/5.1.9/>`_ and `Django 4.2.21 <https://docs.djangoproject.com/en/dev/releases/4.2.21/>`_. These releases address the security issues detailed below. We encourage all users of Django to upgrade as soon as possible. CVE-2025-32873: Denial-of-service possibility in ``strip_tags()`` ================================================================= ``django.utils.html.strip_tags()`` would be slow to evaluate certain inputs containing large sequences of incomplete HTML tags. This function is used to implement the ``striptags`` template filter, which was thus also vulnerable. ``django.utils.html.strip_tags()`` now raises a ``SuspiciousOperation`` exception if it encounters an unusually large number of unclosed opening tags. Thanks to Elias Myllymäki for the report. This issue has severity "moderate" according to the Django security policy. Affected supported versions =========================== * Django main * Django 5.2 * Django 5.1 * Django 4.2 Resolution ========== Patches to resolve the issue have been applied to Django's main, 5.2, 5.1, and 4.2 branches. The patches may be obtained from the following changesets. CVE-2025-32873: Denial-of-service possibility in ``strip_tags()`` ----------------------------------------------------------------- * On the `main branch < https://github.com/django/django/commit/9f3419b519799d69f2aba70b9d25abe2e70d03e0 >`__ * On the `5.2 branch < https://github.com/django/django/commit/c9731dc656e533187b021b4d81f8293d6c943a43 >`__ * On the `5.1 branch < https://github.com/django/django/commit/0b42f6a528df966729b24ecaaed67f85e5edc3dc >`__ * On the `4.2 branch < https://github.com/django/django/commit/9cd8028f3e38dca8e51c1388f474eecbe7d6ca3c >`__ The following releases have been issued ======================================= * Django 5.2.1 (`download Django 5.2.1 <https://www.djangoproject.com/m/releases/5.2/Django-5.2.1.tar.gz>`_ | `5.2.1 checksums <https://www.djangoproject.com/m/pgp/Django-5.2.1.checksum.txt>`_) * Django 5.1.9 (`download Django 5.1.9 <https://www.djangoproject.com/m/releases/5.1/Django-5.1.9.tar.gz>`_ | `5.1.9 checksums <https://www.djangoproject.com/m/pgp/Django-5.1.9.checksum.txt>`_) * Django 4.2.21 (`download Django 4.2.21 <https://www.djangoproject.com/m/releases/4.2/Django-4.2.21.tar.gz>`_ | `4.2.21 checksums <https://www.djangoproject.com/m/pgp/Django-4.2.21.checksum.txt>`_) The PGP key ID used for this release is Natalia Bidart: `2EE82A8D9470983E < https://github.com/nessita.gpg>`_ General notes regarding security reporting ========================================== As always, we ask that potential security issues be reported via private email to ``security@...ngoproject.com``, and not via Django's Trac instance, nor via the Django Forum. Please see `our security policies <https://www.djangoproject.com/security/>`_ for further information. * Machine-readable CVE data for CVE-2025-32873: { "affected": [ { "collectionURL": "https://github.com/django/django/", "defaultStatus": "affected", "packageName": "django", "versions": [ { "lessThan": "5.2.1", "status": "affected", "version": "5.2.0", "versionType": "semver" }, { "lessThan": "5.2.*", "status": "unaffected", "version": "5.2.1", "versionType": "semver" }, { "lessThan": "5.1.9", "status": "affected", "version": "5.1.0", "versionType": "semver" }, { "lessThan": "5.1.*", "status": "unaffected", "version": "5.1.9", "versionType": "semver" }, { "lessThan": "4.2.21", "status": "affected", "version": "4.2.0", "versionType": "semver" }, { "lessThan": "4.2.*", "status": "unaffected", "version": "4.2.21", "versionType": "semver" } ] } ], "credits": [ { "lang": "en", "type": "reporter", "value": "Django would like to thank Elias Myllym\u00e4ki for reporting this issue." } ], "datePublic": "05/07/2025", "descriptions": [ { "lang": "en", "value": "The `strip_tags()` function in Django is vulnerable to a potential denial-of-service (DoS) vector when processing inputs containing large sequences of unclosed HTML entities. When passed such input, `strip_tags()` has poor performance, potentially leading to service degradation or unresponsiveness. The template filter `striptags` is also vulnerable, since it is built on top of `strip_tags()`." } ], "metrics": [ { "other": { "content": { "namespace": " https://docs.djangoproject.com/en/dev/internals/security/#security-issue-severity-levels ", "value": "moderate" }, "type": "Django severity rating" } } ], "references": [ { "name": "Django security releases issued: 5.2.1, 5.1.9 and 4.2.21", "tags": [ "vendor-advisory" ], "url": " https://www.djangoproject.com/weblog/2025/may/07/security-releases/" } ], "timeline": [ { "lang": "en", "time": "2025-05-07T14:00:00+00:00", "value": "Made public." } ], "title": "Denial-of-service possibility in strip_tags()" }
Powered by blists - more mailing lists
Please check out the Open Source Software Security Wiki, which is counterpart to this mailing list.
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.