CVE-2024-22195

NameCVE-2024-22195
DescriptionJinja 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.
SourceCVE (at NVD; CERT, LWN, oss-sec, fulldisc, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more)
ReferencesDLA-3715-1, DLA-3988-1
Debian Bugs1060748

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
jinja2 (PTS)bullseye2.11.3-1vulnerable
bullseye (security)2.11.3-1+deb11u2fixed
bookworm3.1.2-1+deb12u1fixed
trixie3.1.3-1.1fixed
sid3.1.3-2fixed

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
jinja2sourcebuster2.10-2+deb10u1DLA-3715-1
jinja2sourcebullseye2.11.3-1+deb11u1DLA-3988-1
jinja2sourcebookworm3.1.2-1+deb12u1
jinja2source(unstable)3.1.3-11060748

Notes

https://github.com/pallets/jinja/security/advisories/GHSA-h5c8-rqwp-cp95
Fixed by: https://github.com/pallets/jinja/commit/7dd3680e6eea0d77fde024763657aa4d884ddb23 (3.1.3)

Search for package or bug name: Reporting problems