Vulnerabilities · 2024 · Palletsprojects
CVE-2024-22195
Palletsprojects Jinja vulnerability
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.
Affected products
Jinja. The exact versions are in the references.
What to do now
- Check your exposureFind out whether Palletsprojects Jinja runs anywhere in your environment, including systems of suppliers.
- UpdateInstall the version in which the vendor fixed the vulnerability. The references lead to the advisory.
- Limit access until thenIf you cannot update at once, take the system off the internet or restrict who can reach it.
References
- github.com/pallets/jinja/security/advisories/GHSA-h5c8-rqwp-cp95
- nvd.nist.gov/vuln/detail/CVE-2024-22195
- github.com/pallets/jinja/commit/716795349a41d4983a9a4771f7d883c96ea17be7
- github.com/pallets/jinja/releases/tag/3.1.3
- lists.debian.org/debian-lts-announce/2024/01/msg00010.html
- lists.fedoraproject.org/archives/list/[email protected]/message/5XC
- lists.fedoraproject.org/archives/list/[email protected]/message/DEL
- lists.fedoraproject.org/archives/list/[email protected]/message/O7Y
- nvd.nist.gov/vuln/detail/CVE-2024-22195
- cve.org/CVERecord?id=CVE-2024-22195
More vulnerabilities in Palletsprojects products
CVE-2026-21860CVE-2026-7246CVE-2025-66221CVE-2025-27516CVE-2024-56326CVE-2024-56201CVE-2024-49767CVE-2024-49766All 25
Data: CVE list and the NVD. This product uses data from the NVD API but is not endorsed or certified by the NVD.