Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. Django
  4. ›
  5. CVE-2022-22818

CVE-2022-22818: Cross-site Scripting in Django

February 4, 2022 (updated September 20, 2024)

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.

References

  • docs.djangoproject.com/en/4.0/releases/security
  • github.com/advisories/GHSA-95rw-fx8r-36v6
  • github.com/django/django
  • github.com/django/django/commit/01422046065d2b51f8f613409cad2c81b39487e5
  • github.com/django/django/commit/1a1e8278c46418bde24c86a65443b0674bae65e2
  • github.com/django/django/commit/c27a7eb9f40b64990398978152e62b6ff839c2e6
  • github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2022-19.yaml
  • groups.google.com/forum/
  • lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/B4SQG2EAF4WCI2SLRL6XRDJ3RPK3ZRDV
  • nvd.nist.gov/vuln/detail/CVE-2022-22818
  • security.netapp.com/advisory/ntap-20220221-0003
  • www.debian.org/security/2022/dsa-5254
  • www.djangoproject.com/weblog/2022/feb/01/security-releases

Code Behaviors & Features

Detect and mitigate CVE-2022-22818 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions starting from 2.2 before 2.2.27, all versions starting from 3.2 before 3.2.12, all versions starting from 4.0 before 4.0.2

Fixed versions

  • 2.2.27
  • 3.2.12
  • 4.0.2

Solution

Upgrade to versions 2.2.27, 3.2.12, 4.0.2 or above.

Impact 6.1 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Learn more about CVSS

Weakness

  • CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Source file

pypi/Django/CVE-2022-22818.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:15:33 +0000.