* Announce:
https://www.djangoproject.com/weblog/2025/apr/02/security-releases/

* 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.1.8 <https://docs.djangoproject.com/en/dev/releases/5.1.8/>`_ and
`Django 5.0.14 <https://docs.djangoproject.com/en/dev/releases/5.0.14/>`_.
These releases address the security issues detailed below. We encourage all
users of Django to upgrade as soon as possible.

CVE-2025-27556: Potential denial-of-service vulnerability in ``LoginView``,
``LogoutView``, and ``set_language()`` on Windows
=============================================================================================================================

Python's NFKC normalization is slow on Windows. As a consequence,
``django.contrib.auth.views.LoginView``,
``django.contrib.auth.views.LogoutView``,
and ``django.views.i18n.set_language`` were subject to a potential
denial-of-service attack via certain inputs with a very large number of
Unicode
characters.

Thanks to sw0rd1ight for the report.

This issue has severity "moderate" according to the Django security policy.


Affected supported versions
===========================

* Django main
* Django 5.2 (currently at release candidate status)
* Django 5.1
* Django 5.0

Resolution
==========

Patches to resolve the issue have been applied to Django's
main, 5.2 (currently at release candidate status), 5.1, and 5.0 branches.
The patches may be obtained from the following changesets.

CVE-2025-27556: Potential denial-of-service vulnerability in ``LoginView``,
``LogoutView``, and ``set_language()`` on Windows
-----------------------------------------------------------------------------------------------------------------------------

* On the `main branch <
https://github.com/django/django/commit/39e2297210d9d2938c75fc911d45f0e863dc4821
>`__
* On the `5.2 branch <
https://github.com/django/django/commit/2cb311f7b069723027fb5def4044d1816d7d2afd
>`__
* On the `5.1 branch <
https://github.com/django/django/commit/edc2716d01a6fdd84b173c02031695231bcee1f8
>`__
* On the `5.0 branch <
https://github.com/django/django/commit/8c6871b097b6c49d2a782c0d80d908bcbe2116f1
>`__


The following releases have been issued
=======================================

* Django 5.1.8 (`download Django 5.1.8
  <https://www.djangoproject.com/m/releases/5.1/Django-5.1.8.tar.gz>`_ |
  `5.1.8 checksums
  <https://www.djangoproject.com/m/pgp/Django-5.1.8.checksum.txt>`_)
* Django 5.0.14 (`download Django 5.0.14
  <https://www.djangoproject.com/m/releases/5.0/Django-5.0.14.tar.gz>`_ |
  `5.0.14 checksums
  <https://www.djangoproject.com/m/pgp/Django-5.0.14.checksum.txt>`_)

The PGP key ID used for this release is : `3955B19851EA96EF <
https://github.com/sarahboyce.gpg>`_


General notes regarding security reporting
==========================================

As always, we ask that potential security issues be reported via private
email
to ``secur...@djangoproject.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-27556:
{
  "affected": [
    {
      "collectionURL": "https://github.com/django/django/";,
      "defaultStatus": "affected",
      "packageName": "django",
      "versions": [
        {
          "lessThan": "5.1.8",
          "status": "affected",
          "version": "5.1.0",
          "versionType": "semver"
        },
        {
          "lessThan": "5.1.*",
          "status": "unaffected",
          "version": "5.1.8",
          "versionType": "semver"
        },
        {
          "lessThan": "5.0.14",
          "status": "affected",
          "version": "5.0.0",
          "versionType": "semver"
        },
        {
          "lessThan": "5.0.*",
          "status": "unaffected",
          "version": "5.0.14",
          "versionType": "semver"
        }
      ]
    }
  ],
  "credits": [
    {
      "lang": "en",
      "type": "reporter",
      "value": "Django would like to thank sw0rd1ight for reporting this
issue."
    }
  ],
  "datePublic": "2025-04-02T12:00:00+00:00",
  "descriptions": [
    {
      "lang": "en",
      "value": "NFKC normalization in Python is slow on Windows. As a
consequence, django.contrib.auth.views.LoginView,
django.contrib.auth.views.LogoutView, and django.views.i18n.set_language
were subject to a potential  denial-of-service attack via certain inputs
with a very large number of Unicode characters."
    }
  ],
  "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.1.8 and 5.0.14",
      "tags": [
        "vendor-advisory"
      ],
      "url": "
https://www.djangoproject.com/weblog/2025/apr/02/security-releases/";
    }
  ],
  "timeline": [
    {
      "lang": "en",
      "time": "2025-04-02T12:00:00+00:00",
      "value": "Made public."
    }
  ],
  "title": "Potential denial-of-service vulnerability in LoginView,
LogoutView, and set_language() on Windows"
}

Reply via email to