{"id":"CVE-2022-22818","details":"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.","aliases":["BIT-django-2022-22818","GHSA-95rw-fx8r-36v6","PYSEC-2022-19"],"modified":"2026-05-28T04:04:24.936215619Z","published":"2022-02-03T00:00:00Z","related":["SUSE-SU-2022:0285-1","SUSE-SU-2022:0286-1","openSUSE-SU-2023:0005-1","openSUSE-SU-2024:11804-1","openSUSE-SU-2024:14208-1","openSUSE-SU-2025:14662-1","openSUSE-SU-2026:10005-1"],"database_specific":{"cna_assigner":"mitre","unresolved_ranges":[{"source":"DESCRIPTION","extracted_events":[{"introduced":"2.2"},{"fixed":"2.2.27"},{"introduced":"3.2"},{"fixed":"3.2.12"},{"introduced":"4.0"},{"fixed":"4.0.2"}]}],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/22xxx/CVE-2022-22818.json"},"references":[{"type":"WEB","url":"https://docs.djangoproject.com/en/4.0/releases/security/"},{"type":"WEB","url":"https://groups.google.com/forum/#%21forum/django-announce"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/22xxx/CVE-2022-22818.json"},{"type":"ADVISORY","url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/B4SQG2EAF4WCI2SLRL6XRDJ3RPK3ZRDV/"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-22818"},{"type":"ADVISORY","url":"https://security.netapp.com/advisory/ntap-20220221-0003/"},{"type":"ADVISORY","url":"https://www.debian.org/security/2022/dsa-5254"},{"type":"ARTICLE","url":"https://www.djangoproject.com/weblog/2022/feb/01/security-releases/"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/django/django","events":[{"introduced":"2a62cdcfec85938f40abb2e9e6a9ff497e02afe8"},{"fixed":"e541f2d05b88e58c18b82b622aacc38d670eb5f6"},{"introduced":"3591e1c1acbd7c13174275367c3fdf012cb0413b"},{"fixed":"fdf209eab8949ddc345aa0212b349c79fc6fdebb"},{"introduced":"ef62a3a68c9d558486145a42c0d71ea9a76add9e"},{"fixed":"b12be7ad6b83ffc512252953ef28d0d099f96ad7"}],"database_specific":{"extracted_events":[{"introduced":"2.2"},{"fixed":"2.2.27"},{"introduced":"3.2"},{"fixed":"3.2.12"},{"introduced":"4.0"},{"fixed":"4.0.2"}],"source":"CPE_RANGE","cpe":"cpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:*"}}],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-22818.json"}}],"schema_version":"1.7.5"}