{"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-04-16T04:39:47.175025284Z","published":"2022-02-03T02:15:07.580Z","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"],"references":[{"type":"WEB","url":"https://groups.google.com/forum/#%21forum/django-announce"},{"type":"WEB","url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/B4SQG2EAF4WCI2SLRL6XRDJ3RPK3ZRDV/"},{"type":"ADVISORY","url":"https://security.netapp.com/advisory/ntap-20220221-0003/"},{"type":"ADVISORY","url":"https://www.debian.org/security/2022/dsa-5254"},{"type":"FIX","url":"https://docs.djangoproject.com/en/4.0/releases/security/"},{"type":"FIX","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":{"versions":[{"introduced":"2.2"},{"fixed":"2.2.27"},{"introduced":"3.2"},{"fixed":"3.2.12"},{"introduced":"4.0"},{"fixed":"4.0.2"}]}}],"database_specific":{"unresolved_ranges":[{"events":[{"introduced":"0"},{"last_affected":"35"}]},{"events":[{"introduced":"0"},{"last_affected":"11.0"}]}],"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-22818.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"}]}