XSS in Pallets Jinja
CVE-2024-22195
Jinja is an extensible templating engine. Special placeholders in the template allow writing code similar to Python syntax. It is possible to inject arbitrary HTML attributes into the rendered HTML template, potentially leading to Cross-Site Scripting (XSS). The Jinja `xmlattr` filter can be abused to inject arbitrary HTML attribute keys and values, bypassing the auto escaping mechanism and potentially leading to XSS. It may also be possible to bypass attribute validation checks if they are blacklist-based.
Vulnerability class: XSS (Cross-Site Scripting)
Published · last modified .
CVSS v3 metric
CVSS v3 base score 5.4 (Medium). Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N.
EPSS exploit prediction
EPSS 0.009, 60.0th percentile (scored ); unchanged over 30 days. About EPSS.
Affected products
- Pallets Jinja — versions < 3.1.3
- Palletsprojects Jinja
Weakness classification (CWE)
Public exploits and proof-of-concept code
Also mentioned in 4 other repositories (furmidgeuk/snyk-scan-action, Its-Yayo/f-test, ranjith16/renovate_test, …). These reference the CVE in a list, notes or a scanner and are not exploit code for it.
References
- https://github.com/pallets/jinja/security/advisories/GHSA-h5c8-rqwp-cp95 (Third Party Advisory)
- https://github.com/pallets/jinja/releases/tag/3.1.3 (Release Notes)
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/…
- lists.debian.org/debian-lts-announce/2024/01/msg00010.html
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/…
- lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/…
- lists.debian.org/debian-lts-announce/2024/12/msg00009.html