The {% debug %} template tag in Django 2.2 before 2.2.27, 3.2 before 3.2.12, and 4.0…
Priority LOW 33CWE-79Published · Updated
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- Low
- Impact type
- Cross-site scripting
- Confidentiality · integrity · availability
- Low · Low · None
- Fix status
- Partial Red Hat: 4 fixed, 10 without a fix
Attack profile from CVSS 3.1 · NVD. Fix status from CNA, GitHub and Red Hat. Impact type from CWE-79.
Summary
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.
Why it matters now
EPSS 0.03356 88th percentileScored 2026-11-07
Public exploit Yes 1 exploit referenceTagged by NVD
Fix Partial Django (PyPI): 2.2.27, 3.2.12, 4.0.2Red Hat: 4 advisoriesRed Hat: 4 fixed, 10 without a fix
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | — | all versions | — | No fix listed | CNA |
| — | Django (PyPI) | 2.2 to before 2.2.27 | 2.2.27 | Patch available | GHSA-95rw-fx8r-36v6 |
| — | Django (PyPI) | 3.2 to before 3.2.12 | 3.2.12 | Patch available | GHSA-95rw-fx8r-36v6 |
| — | Django (PyPI) | 4.0 to before 4.0.2 | 4.0.2 | Patch available | GHSA-95rw-fx8r-36v6 |
- — Vendor— Affected all versions Fixed in — No fix listed CNA
- Django (PyPI) Vendor— Affected 2.2 to before 2.2.27 Fixed in 2.2.27 Patch available GHSA-95rw-fx8r-36v6
- Django (PyPI) Vendor— Affected 3.2 to before 3.2.12 Fixed in 3.2.12 Patch available GHSA-95rw-fx8r-36v6
- Django (PyPI) Vendor— Affected 4.0 to before 4.0.2 Fixed in 4.0.2 Patch available GHSA-95rw-fx8r-36v6
CPE configurations NVD · 3
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:* | 2.2 to before 2.2.27; 3.2 to before 3.2.12; 4.0 to before 4.0.2 | Vulnerable | djangoproject |
| cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:* | 35 | Vulnerable | Fedoraproject |
| cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:* | 11.0 | Vulnerable | Debian |
- cpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:* Versions 2.2 to before 2.2.27; 3.2 to before 3.2.12; 4.0 to before 4.0.2 Vulnerable ·djangoproject
- cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:* Versions 35 Vulnerable ·Fedoraproject
- cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:* Versions 11.0 Vulnerable ·Debian
Remediation
- Fix · GHSA-95rw-fx8r-36v6 Django (PyPI) Fixed in 2.2.27 Advisory →
- Fix · GHSA-95rw-fx8r-36v6 Django (PyPI) Fixed in 3.2.12 Advisory →
- Fix · GHSA-95rw-fx8r-36v6 Django (PyPI) Fixed in 4.0.2 Advisory →
Red Hat 4 advisories
- RHSA-2022:8872 Released 2022-12-07 · Red Hat rating ImportantRed Hat OpenStack Platform 16.1.9 (python-django20) security update
- Red Hat OpenStack Platform 16.1 python-django20-2.0.13-18.el8ost, python-django20-bash-completion-2.0.13-18.el8ost, python3-django20-2.0.13-18.el8ost
- RHSA-2022:8853 Released 2022-12-07 · Red Hat rating ModerateRed Hat OpenStack Platform 16.2.4 (python-django20) security update
- Red Hat OpenStack Platform 16.2 python-django20-2.0.13-18.el8ost, python3-django20-2.0.13-18.el8ost
- RHSA-2022:8506 Released 2022-11-16 · Red Hat rating ImportantSatellite 6.12 Release
- Red Hat Satellite 6.12 for RHEL 8 candlepin-4.1.15-1.el8sat, candlepin-selinux-4.1.15-1.el8sat, foreman-3.3.0.17-1.el8sat +19
Show 1 more Red Hat advisories
- RHSA-2022:5498 Released 2022-07-05 · Red Hat rating ModerateSatellite 6.11 Release
- Red Hat Satellite 6.11 for RHEL 7 candlepin-4.1.13-1.el7sat, foreman-3.1.1.21-2.el7sat, libsolv-0.7.22-1.el7pc +4
- Red Hat Satellite 6.11 for RHEL 8 candlepin-4.1.13-1.el8sat, foreman-3.1.1.21-2.el8sat, libsolv-0.7.22-1.el8pc +8
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat Ansible Automation Platform 1.2 | Affected | No fix planned: Will not fix |
| Red Hat Ansible Automation Platform 2 | Affected | No fix planned: Will not fix |
| Red Hat Ansible Tower 3 | Affected | No fix planned: Will not fix |
| Red Hat Ceph Storage 2 | Affected | No fix planned: Out of support scope |
| Red Hat Ceph Storage 3 | Affected | No fix planned: Out of support scope |
| Red Hat OpenStack Platform 13 (Queens) | Affected | No fix planned: Out of support scope |
| Red Hat Satellite 6 | Affected | No fix yet |
| Red Hat Storage 3 | Affected | No fix planned: Will not fix |
| Red Hat Update Infrastructure 3 for Cloud Providers | Affected | No fix planned: Will not fix |
| Red Hat Update Infrastructure 4 for Cloud Providers | Affected | No fix yet |
| Red Hat OpenStack Platform 16.1 | Fixed | RHSA-2022:8872 |
| Red Hat OpenStack Platform 16.2 | Fixed | RHSA-2022:8853 |
| Red Hat Satellite 6.11 for RHEL 8 | Fixed | RHSA-2022:5498 |
| Red Hat Satellite 6.12 for RHEL 8 | Fixed | RHSA-2022:8506 |
Not affected: 3 products
- Red Hat Satellite 6.11 for RHEL 7
- Red Hat Satellite 6.11 for RHEL 8
- Red Hat Satellite 6.12 for RHEL 8
Timeline
- 2026-10-02 Threatist record created from CVE-2022-22818
- 2026-10-03 Alias added: GHSA-95rw-fx8r-36v6
References
Advisory 5
Other 11
- https://groups.google.com/forum/#%21forum/django-announce
- https://github.com/django/django/commit/01422046065d2b51f8f613409cad2c81b39487e5
- https://github.com/django/django/commit/1a1e8278c46418bde24c86a65443b0674bae65e2
- https://github.com/django/django/commit/c27a7eb9f40b64990398978152e62b6ff839c2e6
- https://docs.djangoproject.com/en/4.0/releases/security
- https://github.com/django/django
- https://github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2022-19.yaml
- https://groups.google.com/forum/#!forum/django-announce
- https://lists.fedoraproject.org/archives/list/[email protected]/message/B4SQG2EAF4WCI2SLRL6XRDJ3RPK3ZRDV
- https://security.netapp.com/advisory/ntap-20220221-0003
- https://www.djangoproject.com/weblog/2022/feb/01/security-releases
Sources
- CVE-2022-22818 · CVE Program
- CVE-2022-22818 · NVD
- FIRST EPSS
- GHSA-95rw-fx8r-36v6 · GitHub Advisory Database · CC BY 4.0
- CVE-2022-22818 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences