CVE-2024-22195 json
Jinja vulnerable to Cross-Site Scripting (XSS)
published 2024-01-11 2 y ago modified 2026-09-10 1 mo ago also GHSA-h5c8-rqwp-cp95 , PYSEC-2026-1473 , EUVD-2024-0365
- cvss
- 5.4
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.9%
- EPSS 0.9% chance of exploitation in 30 days, percentile 59%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- pypi jinja2 3.1.3
- palletsprojects jinja 3.1.3
- jinja2 Debian 12 3.1.2-1+deb12u1
- jinja2 Debian 14, Debian 13 3.1.3-1
debian advisories DEBIAN-CVE-2024-22195
- jinja2 Ubuntu 20.04 LTS 2.10.1-2ubuntu0.2
- jinja2 Ubuntu 22.04 LTS 3.0.3-1ubuntu0.1
- jinja2 Ubuntu 24.04 LTS 3.1.2-1ubuntu1
- jinja2 Ubuntu Pro 14.04 LTS 2.7.2-2ubuntu0.1~esm2
- jinja2 Ubuntu Pro 16.04 LTS 2.8-1ubuntu0.1+esm2
- jinja2 Ubuntu Pro 18.04 LTS 2.10-1ubuntu0.18.04.1+esm1
ubuntu advisories UBUNTU-CVE-2024-22195
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- fence-agents RHEL 9 4.10.0-55.el9_3.3
- fence-virt RHEL 9 4.10.0-55.el9_3.3
- fence-virtd RHEL 9 4.10.0-55.el9_3.3
- fence-virtd-cpg RHEL 9 4.10.0-55.el9_3.3
- fence-virtd-tcp RHEL 9 4.10.0-55.el9_3.3
- fence-agents-all RHEL 9 4.10.0-55.el9_3.3
- fence-agents-apc RHEL 9 4.10.0-55.el9_3.3
- fence-agents-aws RHEL 9 4.10.0-55.el9_3.3
red hat advisories RHBA-2024:1416RHBA-2024:1137RHBA-2024:1398RHBA-2024:1114RHBA-2024:0891RHBA-2024:1091
- grafana Multi Linux Manager Tools SLE-15 12.4.10-150002.4.27.1
- mgr-push Multi Linux Manager Tools SLE-15 5.2.5-150002.3.12.1
- spacecmd Multi Linux Manager Tools SLE-15 5.2.10-150002.3.15.1
- uyuni-tools Multi Linux Manager Tools SLE-Micro-5, Multi Linux Manager Tools SLE-15 5.2.17-150002.3.20.1
- venv-salt-minion Multi Linux Manager Tools SLE-Micro-5, Multi Linux Manager Tools SLE-15 3006.0-150002.5.22.1
- spacewalk-client-tools Multi Linux Manager Tools SLE-15 5.2.7-150002.3.12.1
- golang-github-prometheus-prometheus Multi Linux Manager Tools SLE-15 3.13.2-150002.3.19.1
- mgr-push Multi Linux Manager Tools SLE-12 5.2.5-120002.3.12.1
suse advisories SUSE-SU-2026:4585-1SUSE-SU-2026:4584-1SUSE-SU-2026:4583-1SUSE-SU-2026:4582-1SUSE-SU-2026:4581-1SUSE-SU-2026:4580-1
- python-Jinja2 openSUSE Tumbleweed 3.1.6-2.4
- python-Jinja2 openSUSE Tumbleweed 3.1.3-1.1
opensuse advisories openSUSE-SU-2026:11992-1openSUSE-SU-2024:13581-1
- fence-agents-all AlmaLinux 8 4.2.1-129.el8
- fence-agents-apc AlmaLinux 8 4.2.1-129.el8
- fence-agents-aws AlmaLinux 8 4.2.1-129.el8
- fence-agents-eps AlmaLinux 8 4.2.1-129.el8
- fence-agents-gce AlmaLinux 8 4.2.1-129.el8
- fence-agents-rsa AlmaLinux 8 4.2.1-129.el8
- fence-agents-rsb AlmaLinux 8 4.2.1-129.el8
- fence-agents-sbd AlmaLinux 8 4.2.1-129.el8
almalinux advisories ALSA-2024:2968ALSA-2024:2987ALSA-2024:3102ALSA-2024:2132ALSA-2024:2348
- pytz Rocky Linux 8 2017.2-13.module+el8.10.0+1817+0b01df83
- babel Rocky Linux 8 2.5.1-10.module+el8.9.0+1531+a18208f5
- numpy Rocky Linux 8 1:1.14.2-16.module+el8.9.0+1531+a18208f5
- scipy Rocky Linux 8 1.0.0-22.module+el8.10.0+1817+0b01df83
- Cython Rocky Linux 8 0.28.1-7.module+el8.9.0+1531+a18208f5
- pytest Rocky Linux 8 3.4.2-13.module+el8.9.0+1531+a18208f5
- PyYAML Rocky Linux 8 3.12-16.module+el8.9.0+1531+a18208f5
- python2 Rocky Linux 8 2.7.18-17.module+el8.10.0+1813+4b021305.rocky.0.2
rocky linux advisories RLSA-2024:2987RLSA-2024:2968RLSA-2024:3102
- py3-jinja2 Alpine 3.19, Alpine 3.18, Alpine 3.17 3.1.4-r0
- py3-jinja2 Alpine 3.24, Alpine 3.23, Alpine 3.22 +2 more 3.1.3-r0
alpine advisories ALPINE-CVE-2024-22195
Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- python-jinja2 CBL-Mariner 2.0 3.0.3-3
- nodejs18 CBL-Mariner 2.0 18.20.3-3
- nodejs Azure Linux 3.0 20.14.0-1
- python-jinja2 Azure Linux 3.0 3.1.2-2
azure linux advisories AZL-33320AZL-33349AZL-35050AZL-35134
Azure Linux vulnerability data, Copyright (c) Microsoft Corporation, from https://github.com/microsoft/AzureLinuxVulnerabilityData via OSV, under the MIT licence; changed: normalised to fixed package versions per release. MIT
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2024-22195 updated cvss 5.4
jinja2: HTML attribute injection when passing user input as keys to xmlattr filter
-
Red Hat Ansible Automation Platform 1.2 ansible-tower Red Hat Ceph Storage 5 cephadm-ansibleaffected: workaround, no fix planned “Out of support scope”
-
Red Hat Ceph Storage 6 cephadm-ansibleaffected: workaround, no fix planned “Will not fix”
-
Red Hat Enterprise Linux 6 python-jinja2 Red Hat Enterprise Linux 7 python-jinja2affected: workaround, no fix planned “Out of support scope”
-
Red Hat Quay 3 quay/quay-rhel8affected: workaround, no fix available
-
Red Hat Satellite 6 python-jinja2, python2-jinja2, tfm-pulpcore-python-jinja2affected: workaround, no fix available, no fix planned “Will not fix”
-
Red Hat Software Collections rh-python38-python-jinja2affected: workaround, no fix planned “Will not fix”
-
Red Hat Storage 3 gdeployaffected: workaround, no fix planned “Out of support scope”
-
Red Hat Ansible Automation Platform 2.4 for RHEL 8 python39-jinja2 3.1.3-1.el8ap, python3x-jinja2 3.1.3-1.el8ap, automation-controller-venv-tower 4.5.5-2.el8ap Red Hat Ansible Automation Platform 2.4 for RHEL 9 python-jinja2 3.1.3-1.el9ap, python3-jinja2 3.1.3-1.el9ap, automation-controller-venv-tower 4.5.5-2.el9apfixed: vendor fix RHSA-2024:1057
show 27 moreshow fewer
-
Red Hat Ceph Storage 7.1 Tools rhceph/rhceph-7-rhel9 7-385, rhceph/grafana-rhel9 10.4.0-9, rhceph/keepalived-rhel9 2.2.8-20, rhceph/ceph-nvmeof-rhel9 1.2.13-4, rhceph/snmp-notifier-rhel9 1.2.1-67, rhceph/ceph-nvmeof-cli-rhel9 1.2.13-4, +2 morefixed: vendor fix RHSA-2024:3927
-
Red Hat Enterprise Linux AppStream (v. 8) fence-agents 4.2.1-129.el8, python-jinja2 2.10.1-4.el8, python3-jinja2 2.10.1-4.el8, fence-agents 4.2.1-121.el8_9.4, fence-agents-all 4.2.1-129.el8, fence-agents-apc 4.2.1-129.el8, +171 morefixed: vendor fix RHSA-2024:2987
-
Red Hat Enterprise Linux AppStream (v. 9) fence-virt 4.10.0-62.el9, fence-virtd 4.10.0-62.el9, fence-agents 4.10.0-62.el9, python-jinja2 2.11.3-5.el9, python3-jinja2 2.11.3-5.el9, fence-virt 4.10.0-55.el9_3.3, +24 morefixed: vendor fix RHBA-2024:1137
-
Red Hat Enterprise Linux AppStream AUS (v.8.4) fence-agents 4.2.1-65.el8_4.14, fence-agents-all 4.2.1-65.el8_4.14, fence-agents-apc 4.2.1-65.el8_4.14, fence-agents-eps 4.2.1-65.el8_4.14, fence-agents-rsa 4.2.1-65.el8_4.14, fence-agents-rsb 4.2.1-65.el8_4.14, +36 more Red Hat Enterprise Linux AppStream E4S (v.8.4) fence-agents 4.2.1-65.el8_4.14, fence-agents-all 4.2.1-65.el8_4.14, fence-agents-apc 4.2.1-65.el8_4.14, fence-agents-eps 4.2.1-65.el8_4.14, fence-agents-rsa 4.2.1-65.el8_4.14, fence-agents-rsb 4.2.1-65.el8_4.14, +36 morefixed: vendor fix RHBA-2024:1398
-
Red Hat Enterprise Linux AppStream EUS (v.8.6) fence-agents 4.2.1-89.el8_6.11, fence-agents-all 4.2.1-89.el8_6.11, fence-agents-apc 4.2.1-89.el8_6.11, fence-agents-eps 4.2.1-89.el8_6.11, fence-agents-rsa 4.2.1-89.el8_6.11, fence-agents-rsb 4.2.1-89.el8_6.11, +37 morefixed: vendor fix RHBA-2024:1114
-
Red Hat Enterprise Linux AppStream EUS (v.8.8) fence-agents 4.2.1-112.el8_8.3, fence-agents-all 4.2.1-112.el8_8.3, fence-agents-apc 4.2.1-112.el8_8.3, fence-agents-eps 4.2.1-112.el8_8.3, fence-agents-rsa 4.2.1-112.el8_8.3, fence-agents-rsb 4.2.1-112.el8_8.3, +37 morefixed: vendor fix RHBA-2024:1416
-
Red Hat Enterprise Linux AppStream EUS (v.9.0) fence-virt 4.10.0-20.el9_0.11, fence-virtd 4.10.0-20.el9_0.11, fence-agents 4.10.0-20.el9_0.11, fence-virtd-cpg 4.10.0-20.el9_0.11, fence-virtd-tcp 4.10.0-20.el9_0.11, fence-agents-virsh 4.10.0-20.el9_0.11, +9 morefixed: vendor fix RHSA-2024:1155
-
Red Hat Enterprise Linux AppStream EUS (v.9.2) fence-virt 4.10.0-43.el9_2.3, fence-virtd 4.10.0-43.el9_2.3, fence-agents 4.10.0-43.el9_2.3, fence-virtd-cpg 4.10.0-43.el9_2.3, fence-virtd-tcp 4.10.0-43.el9_2.3, fence-agents-virsh 4.10.0-43.el9_2.3, +8 morefixed: vendor fix RHBA-2024:1091
-
Red Hat Enterprise Linux AppStream TUS (v.8.4) fence-agents 4.2.1-65.el8_4.14, fence-agents-all 4.2.1-65.el8_4.14, fence-agents-apc 4.2.1-65.el8_4.14, fence-agents-eps 4.2.1-65.el8_4.14, fence-agents-rsa 4.2.1-65.el8_4.14, fence-agents-rsb 4.2.1-65.el8_4.14, +36 morefixed: vendor fix RHBA-2024:1398
-
Red Hat Enterprise Linux High Availability (v. 8) fence-agents-aws 4.2.1-121.el8_9.4, fence-agents-gce 4.2.1-121.el8_9.4, fence-agents-aliyun 4.2.1-121.el8_9.4, fence-agents-azure-arm 4.2.1-121.el8_9.4, fence-agents-openstack 4.2.1-121.el8_9.4fixed: vendor fix RHBA-2024:0891
-
Red Hat Enterprise Linux High Availability (v. 9) fence-agents-all 4.10.0-55.el9_3.3, fence-agents-apc 4.10.0-55.el9_3.3, fence-agents-aws 4.10.0-55.el9_3.3, fence-agents-eps 4.10.0-55.el9_3.3, fence-agents-gce 4.10.0-55.el9_3.3, fence-agents-rsa 4.10.0-55.el9_3.3, +36 morefixed: vendor fix RHBA-2024:1137
-
Red Hat Enterprise Linux High Availability AUS (v.8.4) fence-agents-aws 4.2.1-65.el8_4.14, fence-agents-gce 4.2.1-65.el8_4.14, fence-agents-aliyun 4.2.1-65.el8_4.14, fence-agents-azure-arm 4.2.1-65.el8_4.14fixed: vendor fix RHBA-2024:1398
-
Red Hat Enterprise Linux High Availability EUS (v.8.6) fence-agents-aws 4.2.1-89.el8_6.11, fence-agents-gce 4.2.1-89.el8_6.11, fence-agents-aliyun 4.2.1-89.el8_6.11, fence-agents-azure-arm 4.2.1-89.el8_6.11fixed: vendor fix RHBA-2024:1114
-
Red Hat Enterprise Linux High Availability EUS (v.8.8) fence-agents-aws 4.2.1-112.el8_8.3, fence-agents-gce 4.2.1-112.el8_8.3, fence-agents-aliyun 4.2.1-112.el8_8.3, fence-agents-azure-arm 4.2.1-112.el8_8.3, fence-agents-openstack 4.2.1-112.el8_8.3fixed: vendor fix RHBA-2024:1416
-
Red Hat Enterprise Linux High Availability EUS (v.9.0) fence-agents-all 4.10.0-20.el9_0.11, fence-agents-apc 4.10.0-20.el9_0.11, fence-agents-aws 4.10.0-20.el9_0.11, fence-agents-eps 4.10.0-20.el9_0.11, fence-agents-gce 4.10.0-20.el9_0.11, fence-agents-rsa 4.10.0-20.el9_0.11, +36 morefixed: vendor fix RHSA-2024:1155
-
Red Hat Enterprise Linux High Availability EUS (v.9.2) fence-agents-all 4.10.0-43.el9_2.3, fence-agents-apc 4.10.0-43.el9_2.3, fence-agents-aws 4.10.0-43.el9_2.3, fence-agents-eps 4.10.0-43.el9_2.3, fence-agents-gce 4.10.0-43.el9_2.3, fence-agents-rsa 4.10.0-43.el9_2.3, +36 morefixed: vendor fix RHBA-2024:1091
-
Red Hat Enterprise Linux HighAvailability (v. 8) fence-agents-aws 4.2.1-129.el8, fence-agents-gce 4.2.1-129.el8, fence-agents-aliyun 4.2.1-129.el8, fence-agents-azure-arm 4.2.1-129.el8, fence-agents-openstack 4.2.1-129.el8fixed: vendor fix RHSA-2024:2968
-
Red Hat Enterprise Linux HighAvailability (v. 9) fence-agents-all 4.10.0-62.el9, fence-agents-apc 4.10.0-62.el9, fence-agents-aws 4.10.0-62.el9, fence-agents-eps 4.10.0-62.el9, fence-agents-gce 4.10.0-62.el9, fence-agents-rsa 4.10.0-62.el9, +36 morefixed: vendor fix RHSA-2024:2132
-
Red Hat Enterprise Linux HighAvailability E4S (v.8.4) fence-agents-aws 4.2.1-65.el8_4.14, fence-agents-gce 4.2.1-65.el8_4.14, fence-agents-aliyun 4.2.1-65.el8_4.14, fence-agents-azure-arm 4.2.1-65.el8_4.14 Red Hat Enterprise Linux HighAvailability TUS (v.8.4) fence-agents-aws 4.2.1-65.el8_4.14, fence-agents-gce 4.2.1-65.el8_4.14, fence-agents-aliyun 4.2.1-65.el8_4.14, fence-agents-azure-arm 4.2.1-65.el8_4.14fixed: vendor fix RHBA-2024:1398
-
Red Hat Enterprise Linux Resilient Storage (v. 8) fence-agents-aws 4.2.1-121.el8_9.4, fence-agents-gce 4.2.1-121.el8_9.4, fence-agents-aliyun 4.2.1-121.el8_9.4, fence-agents-azure-arm 4.2.1-121.el8_9.4, fence-agents-openstack 4.2.1-121.el8_9.4fixed: vendor fix RHBA-2024:0891
-
Red Hat Enterprise Linux Resilient Storage (v. 9) fence-agents-all 4.10.0-55.el9_3.3, fence-agents-apc 4.10.0-55.el9_3.3, fence-agents-aws 4.10.0-55.el9_3.3, fence-agents-eps 4.10.0-55.el9_3.3, fence-agents-gce 4.10.0-55.el9_3.3, fence-agents-rsa 4.10.0-55.el9_3.3, +36 morefixed: vendor fix RHBA-2024:1137
-
Red Hat Enterprise Linux Resilient Storage EUS (v.8.6) fence-agents-aws 4.2.1-89.el8_6.11, fence-agents-gce 4.2.1-89.el8_6.11, fence-agents-aliyun 4.2.1-89.el8_6.11, fence-agents-azure-arm 4.2.1-89.el8_6.11fixed: vendor fix RHBA-2024:1114
-
Red Hat Enterprise Linux Resilient Storage EUS (v.8.8) fence-agents-aws 4.2.1-112.el8_8.3, fence-agents-gce 4.2.1-112.el8_8.3, fence-agents-aliyun 4.2.1-112.el8_8.3, fence-agents-azure-arm 4.2.1-112.el8_8.3, fence-agents-openstack 4.2.1-112.el8_8.3fixed: vendor fix RHBA-2024:1416
-
Red Hat Enterprise Linux Resilient Storage EUS (v.9.0) fence-agents-all 4.10.0-20.el9_0.11, fence-agents-apc 4.10.0-20.el9_0.11, fence-agents-aws 4.10.0-20.el9_0.11, fence-agents-eps 4.10.0-20.el9_0.11, fence-agents-gce 4.10.0-20.el9_0.11, fence-agents-rsa 4.10.0-20.el9_0.11, +36 morefixed: vendor fix RHSA-2024:1155
-
Red Hat Enterprise Linux Resilient Storage EUS (v.9.2) fence-agents-all 4.10.0-43.el9_2.3, fence-agents-apc 4.10.0-43.el9_2.3, fence-agents-aws 4.10.0-43.el9_2.3, fence-agents-eps 4.10.0-43.el9_2.3, fence-agents-gce 4.10.0-43.el9_2.3, fence-agents-rsa 4.10.0-43.el9_2.3, +36 morefixed: vendor fix RHBA-2024:1091
-
Red Hat Enterprise Linux ResilientStorage (v. 8) fence-agents-aws 4.2.1-129.el8, fence-agents-gce 4.2.1-129.el8, fence-agents-aliyun 4.2.1-129.el8, fence-agents-azure-arm 4.2.1-129.el8, fence-agents-openstack 4.2.1-129.el8fixed: vendor fix RHSA-2024:2968
-
Red Hat Enterprise Linux ResilientStorage (v. 9) fence-agents-all 4.10.0-62.el9, fence-agents-apc 4.10.0-62.el9, fence-agents-aws 4.10.0-62.el9, fence-agents-eps 4.10.0-62.el9, fence-agents-gce 4.10.0-62.el9, fence-agents-rsa 4.10.0-62.el9, +36 morefixed: vendor fix RHSA-2024:2132
4 more fixed, 12 more not affected in the full advisory
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- partial
- Assessed
- 2 y ago
Exploit prediction
0.89% chance of exploitation in the next 30 days, higher than 59% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 5.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N |
| NVD | 3.1 | 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| GitHub | 3.1 | 5.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N |
| OSV | 3.1 | 5.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | jinja2 | <3.1.3 |
3.1.3 |
Affected products
- pallets jinja
Classification
- Weakness
-
- CWE-79 Improper Neutralization of Input During Web Page Generation
References
-
github.com
/pallets/jinja/commit/716795349a41d4983a9a4771f7d883c96ea17be7
web, patch
-
github.com
/pallets/jinja/security/advisories/GHSA-h5c8-rqwp-cp95
web, third-party-advisory
-
github.com
/pallets/jinja/releases/tag/3.1.3
web, release-notes
- lists.fedoraproject.org /archives/list/package-announce@lists.fedoraproject.org/message/5XCWZD464AJJJUBOO7CMPXQ4ROBC6JX2/
-
lists.debian.org
/debian-lts-announce/2024/01/msg00010.html
web
- lists.fedoraproject.org /archives/list/package-announce@lists.fedoraproject.org/message/O7YWRBX6JQCWC2XXCTZ55C7DPMGICCN3/
- lists.fedoraproject.org /archives/list/package-announce@lists.fedoraproject.org/message/DELCVUUYX75I5K4Q5WMJG4MUZJA6VAIP/
-
lists.debian.org
/debian-lts-announce/2024/12/msg00009.html
web
-
nvd.nist.gov
/vuln/detail/CVE-2024-22195
advisory
-
github.com
/pallets/jinja
package
-
lists.fedoraproject.org
/archives/list/package-announce@lists.fedoraproject.org/message/5XCWZD464AJJJUBOO7CMPXQ4ROBC6JX2
web
-
lists.fedoraproject.org
/archives/list/package-announce@lists.fedoraproject.org/message/DELCVUUYX75I5K4Q5WMJG4MUZJA6VAIP
web
-
lists.fedoraproject.org
/archives/list/package-announce@lists.fedoraproject.org/message/O7YWRBX6JQCWC2XXCTZ55C7DPMGICCN3
web
-
pypi.org
/project/jinja2
package
-
github.com
/advisories/GHSA-h5c8-rqwp-cp95
advisory
Sources
- CVE List CVE-2024-22195
- GitHub Advisory GHSA-h5c8-rqwp-cp95
- NVD CVE-2024-22195
- OSV PYSEC-2026-1473
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.