CVE-2022-22818

NameCVE-2022-22818
DescriptionThe {% 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.
SourceCVE (at NVD; CERT, LWN, oss-sec, fulldisc, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more)
ReferencesDLA-2906-1, DLA-3191-1, DSA-5254-1
Debian Bugs1004752

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
python-django (PTS)bullseye (security), bullseye2:2.2.28-1~deb11u2fixed
bookworm, bookworm (security)3:3.2.19-1+deb12u1fixed
trixie, sid3:4.2.16-1fixed

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
python-djangosourcestretch1:1.10.7-2+deb9u15DLA-2906-1
python-djangosourcebuster1:1.11.29-1+deb10u4DLA-3191-1
python-djangosourcebullseye2:2.2.28-1~deb11u1DSA-5254-1
python-djangosource(unstable)2:3.2.12-11004752

Notes

https://www.djangoproject.com/weblog/2022/feb/01/security-releases/
https://github.com/django/django/commit/394517f07886495efcf79f95c7ee402a9437bd68 (main)
https://github.com/django/django/commit/01422046065d2b51f8f613409cad2c81b39487e5 (4.0.2)
https://github.com/django/django/commit/1a1e8278c46418bde24c86a65443b0674bae65e2 (3.2.12)
https://github.com/django/django/commit/c27a7eb9f40b64990398978152e62b6ff839c2e6 (2.2.27)

Search for package or bug name: Reporting problems