Live threats

All CVEs / Palletsprojects

CVE-2024-22195Palletsprojects Jinja

Medium 6.1 No auth needed

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.

Original NVD text.

What to do

  1. Apply the vendor's security update for Jinja.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow 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)

VendorProductVersions
palletsprojectsjinja< 3.1.3

Official advisories

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.