CVE-2024-22195Palletsprojects Jinja
Medium 6.1 No auth needed
Follow: this CVE · Palletsprojects · Palletsprojects Jinja We alert you by email or Slack (account required).
- Priority
- 52
- CVSS 3.1
- 6.1
- EPSS
- 1.0% probability of exploitation in 30 days · percentile 61
- Auth required
- No
- Published
- Jan 11, 2024
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-79
- SSVC (CISA)
- Exploitation: none · Automatable: no · Technical impact: partial
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
What happens
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.
What to do
- Apply the vendor's security update for Jinja.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| PyPI | jinja2 |
< 3.1.3 |
3.1.3 |
pip install "jinja2>=3.1.3" |
| PyPI | jinja2 |
< 3.1.3 |
3.1.3 |
pip install "jinja2>=3.1.3" |
Per OSV / GitHub Advisories (GHSA-h5c8-rqwp-cp95, PYSEC-2026-1473). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| palletsprojects | jinja | < 3.1.3 |
Official advisories
- Security update 5.1.6 for Multi-Linux Manager Server · SUSE · SUSE-SU-2026:5436-1 · Nov 25, 2026 Critical
- Security update 5.2.1 for Multi-Linux Manager Client Tools · SUSE · SUSE-SU-2026:4585-1 · Oct 8, 2026 Critical
- Security update 5.2.1 for Multi-Linux Manager Client Tools · SUSE · SUSE-SU-2026:4584-1 · Oct 8, 2026 Critical
Also: SUSE (+5)
Vendor, CERT and distribution advisories that name this CVE. Original titles.
Official sources
References
Links published by the sources. Open them with care.
- github.com Release Notes
- github.com Third Party Advisory
- lists.debian.org
- lists.fedoraproject.org
- lists.fedoraproject.org
- lists.fedoraproject.org
- lists.debian.org