VDB
CVE-2022-22818
CVE-2022-22818
PUBLISHED
CVSS 6.099999904632568 MEDIUM
Cross-site Scripting in Django
Reported by mitre · Published February 3, 2022
django is fixed in 4.0.2, 3.2.12 and 2.2.27 (PyPI)
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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| django | PyPI | 4.0.2, 3.2.12, 2.2.27 |
| python-django | Arch Linux | 4.0.2-1 |
| django | Bitnami | 4.0.2, 3.2.12, 2.2.27 |
| django | djangoproject | 4.0.2, 3.2.12, 2.2.27 |
Risk scores
CVSS 3.1
6.099999904632568
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Affected products
| Vendor | Product | Versions |
|---|---|---|
| n/a | n/a | n/a |
| arch | python-django | 0 |
| n/a | n/a | * |
| PyPI | Django | 2.2, 3.2, 4.0 |
| alpine | py3-django | 0 |
Timeline
- Feb 1, 2022 CVE Published
- Feb 8, 2022 EPSS Score (30 in total, the first dated here)
- Sep 20, 2024 CVE Updated
- Mar 9, 2026 Security Advisory (21 in total, the first dated here)
- Mar 20, 2026 Distribution Patch (18 in total, the first dated here)
- Jul 6, 2026 Coalition ESS Score
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2022-22818
vulnetix vdb fixes CVE-2022-22818
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2022-22818/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- FEDORA-2022-e7fd530688 vendor-advisory
- DSA-5254 vendor-advisory
- https://nvd.nist.gov/vuln/detail/CVE-2022-22818 advisory
- https://github.com/advisories/GHSA-95rw-fx8r-36v6 advisory
- https://github.com/django/django/commit/01422046065d2b51f8f613409cad2c81b39487e5 patch
- https://github.com/django/django/commit/1a1e8278c46418bde24c86a65443b0674bae65e2 patch
- https://github.com/django/django/commit/c27a7eb9f40b64990398978152e62b6ff839c2e6 patch
- https://docs.djangoproject.com/en/4.0/releases/security url
- https://github.com/django/django url
- https://github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2022-19.yaml advisory
- https://groups.google.com/forum/#!forum/django-announce url
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/B4SQG2EAF4WCI2SLRL6XRDJ3RPK3ZRDV url
- https://security.netapp.com/advisory/ntap-20220221-0003 advisory
- https://www.djangoproject.com/weblog/2022/feb/01/security-releases url