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)
Debian Bugs1060748

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
jinja2 (PTS)buster2.10-2vulnerable
buster (security)2.10-2+deb10u1fixed
trixie, sid, bookworm3.1.2-1vulnerable

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

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs


[bookworm] - jinja2 <no-dsa> (Minor issue)
[bullseye] - jinja2 <no-dsa> (Minor issue)
Fixed by: (3.1.3)

Search for package or bug name: Reporting problems