mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Fixed CVE-2022-22818 -- Fixed possible XSS via {% debug %} template tag.
Thanks Keryn Knight for the report. Co-authored-by: Adam Johnson <me@adamj.eu>
This commit is contained in:
committed by
Mariusz Felisiak
parent
97a7274468
commit
394517f078
@@ -194,7 +194,13 @@ from its first value when it's next encountered.
|
||||
---------
|
||||
|
||||
Outputs a whole load of debugging information, including the current context
|
||||
and imported modules.
|
||||
and imported modules. ``{% debug %}`` outputs nothing when the :setting:`DEBUG`
|
||||
setting is ``False``.
|
||||
|
||||
.. versionchanged:: 2.2.27
|
||||
|
||||
In older versions, debugging information was displayed when the
|
||||
:setting:`DEBUG` setting was ``False``.
|
||||
|
||||
.. templatetag:: extends
|
||||
|
||||
|
||||
@@ -6,4 +6,12 @@ Django 2.2.27 release notes
|
||||
|
||||
Django 2.2.27 fixes two security issues with severity "medium" in 2.2.26.
|
||||
|
||||
...
|
||||
CVE-2022-22818: Possible XSS via ``{% debug %}`` template tag
|
||||
=============================================================
|
||||
|
||||
The ``{% debug %}`` template tag didn't properly encode the current context,
|
||||
posing an XSS attack vector.
|
||||
|
||||
In order to avoid this vulnerability, ``{% debug %}`` no longer outputs an
|
||||
information when the ``DEBUG`` setting is ``False``, and it ensures all context
|
||||
variables are correctly escaped when the ``DEBUG`` setting is ``True``.
|
||||
|
||||
@@ -6,4 +6,12 @@ Django 3.2.12 release notes
|
||||
|
||||
Django 3.2.12 fixes two security issues with severity "medium" in 3.2.11.
|
||||
|
||||
...
|
||||
CVE-2022-22818: Possible XSS via ``{% debug %}`` template tag
|
||||
=============================================================
|
||||
|
||||
The ``{% debug %}`` template tag didn't properly encode the current context,
|
||||
posing an XSS attack vector.
|
||||
|
||||
In order to avoid this vulnerability, ``{% debug %}`` no longer outputs an
|
||||
information when the ``DEBUG`` setting is ``False``, and it ensures all context
|
||||
variables are correctly escaped when the ``DEBUG`` setting is ``True``.
|
||||
|
||||
@@ -8,6 +8,16 @@ Django 4.0.2 fixes two security issues with severity "medium" and several bugs
|
||||
in 4.0.1. Also, the latest string translations from Transifex are incorporated,
|
||||
with a special mention for Bulgarian (fully translated).
|
||||
|
||||
CVE-2022-22818: Possible XSS via ``{% debug %}`` template tag
|
||||
=============================================================
|
||||
|
||||
The ``{% debug %}`` template tag didn't properly encode the current context,
|
||||
posing an XSS attack vector.
|
||||
|
||||
In order to avoid this vulnerability, ``{% debug %}`` no longer outputs an
|
||||
information when the ``DEBUG`` setting is ``False``, and it ensures all context
|
||||
variables are correctly escaped when the ``DEBUG`` setting is ``True``.
|
||||
|
||||
Bugfixes
|
||||
========
|
||||
|
||||
|
||||
Reference in New Issue
Block a user