CVE-2024-22195 | Jinja vulnerable to Cross-Site Scripting (XSS)

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.

Published: 2024-01-11 Last update: 2025-11-03 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2024-22195 is rated Moderate Risk (41.4/100): CVSS Medium severity, with medium exploitation likelihood (EPSS 0.89%). Mandatory action: Review affected assets and schedule remediation.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Exploit prediction scoring system (EPSS) score for CVE-2024-22195

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2026-06-15 0.15% 0.89% +0.74%
2 2026-05-04 0.13% 0.15% +0.02%
3 2026-04-29 0.13%

Full EPSS history (13 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2024-22195

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
5.4 3.1 MEDIUM
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:R)
A real person has to do something—click, install, enable—otherwise it doesn’t land.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:L)
Some sensitive info could get out, but not a total data dump.
Integrity (I:L)
Attackers could change some data, but it’s limited—not everything goes.
Availability (A:N)
Service keeps running; no real outage angle.
2.8 2.5 [email protected]
6.1 3.1 MEDIUM
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:R)
A real person has to do something—click, install, enable—otherwise it doesn’t land.
Scope (S:C)
Breaking this can reach past the original component and bite other resources—bigger blast radius.
Confidentiality (C:L)
Some sensitive info could get out, but not a total data dump.
Integrity (I:L)
Attackers could change some data, but it’s limited—not everything goes.
Availability (A:N)
Service keeps running; no real outage angle.
2.8 2.7 [email protected]

Weakness enumeration for CVE-2024-22195

GitHub Security Advisory for CVE-2024-22195

GHSA-h5c8-rqwp-cp95 · Severity: medium · Ecosystem: pip — Jinja vulnerable to HTML attribute injection when passing user input as keys to xmlattr filter

OS Trackers for CVE-2024-22195

vendor priority summary link
alpine medium CVE-2024-22195: 1 source package rows (py3-jinja2); 7 state rows across 7 repos (3.17-main, 3.18-main, 3.19-main, 3.20-main, 3.21-main, 3.22-main, edge-main); fixed 7, open 0. https://security.alpinelinux.org/vuln/CVE-2024-22195
debian not yet assigned CVE-2024-22195 not yet assigned priority: Debian including 1 source packages (jinja2), 5 status rows across 5 suites (bookworm, bullseye, forky, sid, trixie): resolved 5. https://security-tracker.debian.org/tracker/CVE-2024-22195
redhat medium https://access.redhat.com/security/cve/CVE-2024-22195
suse medium CVE-2024-22195 severity moderate: SUSE including 415 source package names (0.3.2-1.2:python311-Jinja2-3.1.2-150400.12.6.1, 0.3.32-3.4:python311-Jinja2-3.1.2-150400.12.6.1, …), 672 product×package rows across 255 product lines (Container containers/lmcache-vllm-openai, Container containers/open-webui, … (255 product lines)): Fixed 455, Known Affected 212, Will Not Fix 5. https://www.suse.com/security/cve/CVE-2024-22195/
ubuntu medium CVE-2024-22195 medium priority: Ubuntu including 1 source packages (jinja2), 11 status rows across 11 suites (bionic, focal, jammy, lunar, mantic, noble, oracular, plucky, trusty, upstream, xenial): released 9, ignored 1, needs-triage 1. https://ubuntu.com/security/CVE-2024-22195

Affected software / configurations for CVE-2024-22195

Vendor Product Version Raw CPE
palletsprojects jinja < 3.1.3 cpe:2.3:a:palletsprojects:jinja:*:*:*:*:*:*:*:*

References for CVE-2024-22195

cvelogic Threat Intelligence