The {% debug %} template tag in Django 2.2 before 2.2.27, 3.2 before 3.2.12, and 4.0 before 4.0.2 does not properly encode the current context. This may lead to XSS.
Advisories
Source ID Title
Debian DLA Debian DLA DLA-2906-1 python-django security update
Debian DLA Debian DLA DLA-3191-1 python-django security update
Debian DSA Debian DSA DSA-5254-1 python-django security update
EUVD EUVD EUVD-2022-0086 The {% debug %} template tag in Django 2.2 before 2.2.27, 3.2 before 3.2.12, and 4.0 before 4.0.2 does not properly encode the current context. This may lead to XSS.
Github GHSA Github GHSA GHSA-95rw-fx8r-36v6 Cross-site Scripting in Django
Ubuntu USN Ubuntu USN USN-5269-1 Django vulnerabilities
Ubuntu USN Ubuntu USN USN-5269-2 Django vulnerabilities
Fixes

Solution

No solution given by the vendor.


Workaround

No workaround given by the vendor.

History

Sun, 13 Jul 2025 13:45:00 +0000

Type Values Removed Values Added
Metrics epss

{'score': 0.00548}

epss

{'score': 0.00621}


cve-icon MITRE

Status: PUBLISHED

Assigner: mitre

Published:

Updated: 2024-08-03T03:21:49.173Z

Reserved: 2022-01-07T00:00:00

Link: CVE-2022-22818

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Modified

Published: 2022-02-03T02:15:07.580

Modified: 2024-11-21T06:47:30.683

Link: CVE-2022-22818

cve-icon Redhat

Severity : Moderate

Publid Date: 2022-02-01T08:00:00Z

Links: CVE-2022-22818 - Bugzilla

cve-icon OpenCVE Enrichment

No data.