GHSA-95rw-fx8r-36v6
MODERATE
Cross-site Scripting in Django
Published February 4, 2022Updated September 20, 2024Source: osv
Details
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.
Remediation
Upgrade to the fixed version using your package manager.
pip
Update django to 4.0.2 or laterpip install "django>=4.0.2"
pip
Update django to 3.2.12 or laterpip install "django>=3.2.12"
pip
Update django to 2.2.27 or laterpip install "django>=2.2.27"
After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.
Affected Packages (3)
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-79Cross-site Scripting (XSS)MITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 3.1 score means for each attack dimension.
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
None
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
References
- https://nvd.nist.gov/vuln/detail/CVE-2022-22818ADVISORY
- https://github.com/django/django/commit/01422046065d2b51f8f613409cad2c81b39487e5WEB
- https://github.com/django/django/commit/1a1e8278c46418bde24c86a65443b0674bae65e2WEB
- https://github.com/django/django/commit/c27a7eb9f40b64990398978152e62b6ff839c2e6WEB
- https://docs.djangoproject.com/en/4.0/releases/securityWEB
- https://github.com/advisories/GHSA-95rw-fx8r-36v6ADVISORY
- https://github.com/django/djangoPACKAGE
- https://github.com/pypa/advisory-database/tree/main/vulns/django/PYSEC-2022-19.yamlWEB
- https://groups.google.com/forum/#!forum/django-announceWEB
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/B4SQG2EAF4WCI2SLRL6XRDJ3RPK3ZRDVWEB
- https://security.netapp.com/advisory/ntap-20220221-0003WEB
- https://www.debian.org/security/2022/dsa-5254WEB
- https://www.djangoproject.com/weblog/2022/feb/01/security-releasesWEB
Risk Assessment
CVSS Score
3.1
Exploitation is difficult or impact is minor. Address in your next planned update.
EPSS Score (30-day exploit probability)
0.56%
Higher than 68% of vulnerabilities
Also Known As
Check if you're affected
Scan your dependencies to see if this vulnerability affects your projects.
Scan Your Dependencies