{"id":"CVE-2022-22818","aliases":["CVE-2022-22818","GHSA-95rw-fx8r-36v6","BIT-DJANGO-2022-22818","PYSEC-2022-19"],"related":[],"kind":"vulnerability","state":"published","title":"Cross-site Scripting in Django","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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"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.","format":"markdown","source":"ghsa"},{"lang":"es","text":"La etiqueta de plantilla {% debug %} en Django versiones 2.2 anteriores a 2.2.27, 3.2 anteriores a 3.2.12 y 4.0 anteriores a 4.0.2, no codifica correctamente el contexto actual. Esto puede conllevar a un ataque de tipo XSS","source":"nvd"}],"published":"2022-02-03T00:00:00.000Z","modified":"2026-09-08T08:46:25.522Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N","rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:M/Au:N/C:N/I:P/A:N","score":4.3,"rating":"MEDIUM"},{"scorer":"Bitnami Vulnerability Database","scheme":"rating","rating":"MEDIUM"}],"cwes":["CWE-79"],"affected":[{"ranges":[{"version":"n/a","status":"affected"}],"source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"2.2","status":"affected","fixed":"2.2.27"}],"ecosystem":"PyPI","package":"django","purl":"pkg:pypi/django","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"3.2","status":"affected","fixed":"3.2.12"}],"ecosystem":"PyPI","package":"django","purl":"pkg:pypi/django","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"4.0","status":"affected","fixed":"4.0.2"}],"ecosystem":"PyPI","package":"django","purl":"pkg:pypi/django","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"2.2","fixed":"2.2.27"},{"status":"affected","introduced":"3.2","fixed":"3.2.12"},{"status":"affected","introduced":"4.0","fixed":"4.0.2"}],"vendor":"djangoproject","product":"django","cpe":"cpe:2.3:a:djangoproject:django:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"35"}],"vendor":"fedoraproject","product":"fedora","cpe":"cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"11.0"}],"vendor":"debian","product":"debian_linux","cpe":"cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"2.2","status":"affected","fixed":"2.2.27"},{"type":"ecosystem","introduced":"3.2","status":"affected","fixed":"3.2.12"},{"type":"ecosystem","introduced":"4.0","status":"affected","fixed":"4.0.2"}],"ecosystem":"PyPI","package":"django","purl":"pkg:pypi/django","source":"pysec"},{"ranges":[{"type":"semver","introduced":"2.2.0","status":"affected","fixed":"2.2.27"},{"type":"semver","introduced":"3.2.0","status":"affected","fixed":"3.2.12"},{"type":"semver","introduced":"4.0.0","status":"affected","fixed":"4.0.2"}],"ecosystem":"Bitnami","package":"django","purl":"pkg:bitnami/django","source":"bitnami"}],"references":[{"url":"https://groups.google.com/forum/#%21forum/django-announce","tags":["web","x-transferred"],"sources":["cvelist","nvd","bitnami"]},{"url":"https://docs.djangoproject.com/en/4.0/releases/security/","tags":["advisory","patch","third-party-advisory","web","x-transferred"],"sources":["cvelist","nvd","pysec","bitnami"]},{"url":"https://www.djangoproject.com/weblog/2022/feb/01/security-releases/","tags":["advisory","article","exploit","patch","third-party-advisory","x-transferred"],"sources":["cvelist","nvd","pysec","bitnami"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/B4SQG2EAF4WCI2SLRL6XRDJ3RPK3ZRDV/","tags":["vendor-advisory","web","x-transferred"],"sources":["cvelist","nvd","bitnami"]},{"url":"https://security.netapp.com/advisory/ntap-20220221-0003/","tags":["advisory","third-party-advisory","x-transferred"],"sources":["cvelist","nvd","bitnami"]},{"url":"https://www.debian.org/security/2022/dsa-5254","tags":["advisory","third-party-advisory","vendor-advisory","web","x-transferred"],"sources":["cvelist","ghsa","nvd","bitnami"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-22818","tags":["advisory","web"],"sources":["ghsa","bitnami"]},{"url":"https://github.com/django/django/commit/01422046065d2b51f8f613409cad2c81b39487e5","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/django/django/commit/1a1e8278c46418bde24c86a65443b0674bae65e2","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/django/django/commit/c27a7eb9f40b64990398978152e62b6ff839c2e6","tags":["web"],"sources":["ghsa"]},{"url":"https://docs.djangoproject.com/en/4.0/releases/security","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/advisories/GHSA-95rw-fx8r-36v6","tags":["advisory"],"sources":["ghsa","pysec"]},{"url":"https://github.com/django/django","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2022-19.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://groups.google.com/forum/#!forum/django-announce","tags":["web"],"sources":["ghsa","pysec"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/B4SQG2EAF4WCI2SLRL6XRDJ3RPK3ZRDV","tags":["web"],"sources":["ghsa"]},{"url":"https://security.netapp.com/advisory/ntap-20220221-0003","tags":["web"],"sources":["ghsa"]},{"url":"https://www.djangoproject.com/weblog/2022/feb/01/security-releases","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"mitre","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-22818","url":"https://www.cve.org/CVERecord?id=CVE-2022-22818","licence":"CVE Terms of Use","modified":"2024-08-03T03:21:49.173Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-95rw-fx8r-36v6","url":"https://github.com/advisories/GHSA-95rw-fx8r-36v6","licence":"CC-BY-4.0","modified":"2024-09-20T15:47:46.984Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-22818","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-22818","licence":"Public domain","modified":"2026-06-17T04:29:05.647Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2022-19","url":"https://osv.dev/vulnerability/PYSEC-2022-19","licence":"CC-BY-4.0","modified":"2023-12-06T01:01:58.226Z"},{"source":"bitnami","name":"Bitnami Vulnerability Database","id":"BIT-DJANGO-2022-22818","url":"https://osv.dev/vulnerability/BIT-DJANGO-2022-22818","licence":"Apache-2.0","modified":"2026-09-08T08:46:25.522Z"}],"updatedAt":"2026-11-25T22:58:09.466Z","epss":{"score":0.02762,"percentile":0.87038,"date":"2026-11-30T12:00:22.000Z"}}