CVE-2024-56326

EUVD-2024-3607
Jinja is an extensible templating engine. Prior to 3.1.5, An oversight in how the Jinja sandboxed environment detects calls to str.format allows an attacker that controls the content of a template to execute arbitrary Python code. To exploit the vulnerability, an attacker needs to control the content of a template. Whether that is the case depends on the type of application using Jinja. This vulnerability impacts users of applications which execute untrusted templates. Jinja's sandbox does catch calls to str.format and ensures they don't escape the sandbox. However, it's possible to store a reference to a malicious string's format method, then pass that to a filter that calls it. No such filters are built-in to Jinja, but could be present through custom filters in an application. After the fix, such indirect calls are also handled by the sandbox. This vulnerability is fixed in 3.1.5.
ProviderTypeBase ScoreAtk. VectorAtk. ComplexityPriv. RequiredVector
NISTPrimary
7.8 HIGH
LOCAL
LOW
LOW
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Base Score
CVSS 3.x
EPSS Score
Percentile: 68%
Affected Products (NVD)
VendorProductVersion
palletsprojectsjinja
𝑥
< 3.1.5
𝑥
= Vulnerable software versions
Debian logo
Debian Releases
Debian Product
Codename
jinja2
bookworm
3.1.2-1+deb12u3
fixed
bullseye
vulnerable
bullseye (security)
2.11.3-1+deb11u4
fixed
forky
3.1.6-1
fixed
sid
3.1.6-1
fixed
trixie
3.1.6-1
fixed
Ubuntu logo
Ubuntu Releases
Ubuntu Product
Codename
jinja2
bionic
Fixed 2.10-1ubuntu0.18.04.1+esm3
released
focal
Fixed 2.10.1-2ubuntu0.4
released
jammy
Fixed 3.0.3-1ubuntu0.3
released
noble
Fixed 3.1.2-1ubuntu1.2
released
oracular
Fixed 3.1.3-1ubuntu1.24.10.1
released
plucky
not-affected
trusty
Fixed 2.7.2-2ubuntu0.1~esm6
released
xenial
Fixed 2.8-1ubuntu0.1+esm5
released
openSUSE logo
openSUSE / SLES Releases
openSUSE Product
Release
python2-Jinja2
suse enterprise server 15 SP2
2.10.1-150000.3.18.1
fixed
python3-Jinja2
suse enterprise sap 15 SP4
2.10.1-150000.3.18.1
fixed
suse enterprise sap 15 SP5
2.10.1-150000.3.18.1
fixed
suse enterprise server 15 SP2
2.10.1-150000.3.18.1
fixed
suse enterprise server 15 SP4
2.10.1-150000.3.18.1
fixed
suse enterprise server 15 SP5
2.10.1-150000.3.18.1
fixed
python311-Jinja2
suse enterprise sap 15 SP4
3.1.2-150400.12.11.1
fixed
suse enterprise sap 15 SP5
3.1.2-150400.12.11.1
fixed
suse enterprise server 15 SP4
3.1.2-150400.12.11.1
fixed
suse enterprise server 15 SP5
3.1.2-150400.12.11.1
fixed
Red Hat logo
Red Hat Enterprise Linux Releases
Red Hat Product
Release
fence-agents-aliyun
RHEL 9
0:4.10.0-76.el9_5.4
fixed
fence-agents-all
RHEL 9
0:4.10.0-76.el9_5.4
fixed
fence-agents-amt-ws
RHEL 9
0:4.10.0-76.el9_5.4
fixed
fence-agents-apc
RHEL 9
0:4.10.0-76.el9_5.4
fixed
fence-agents-apc-snmp
RHEL 9
0:4.10.0-76.el9_5.4
fixed
fence-agents-aws
RHEL 9
0:4.10.0-76.el9_5.4
fixed
fence-agents-azure-arm
RHEL 9
0:4.10.0-76.el9_5.4
fixed
fence-agents-bladecenter
RHEL 9
0:4.10.0-76.el9_5.4
fixed
fence-agents-brocade
RHEL 9
0:4.10.0-76.el9_5.4
fixed
fence-agents-cisco-mds
RHEL 9
0:4.10.0-76.el9_5.4
fixed
fence-agents-cisco-ucs
RHEL 9
0:4.10.0-76.el9_5.4
fixed
fence-agents-common
RHEL 9
0:4.10.0-76.el9_5.4
fixed
fence-agents-compute
RHEL 9
0:4.10.0-76.el9_5.4
fixed
fence-agents-drac5
RHEL 9
0:4.10.0-76.el9_5.4
fixed
fence-agents-eaton-snmp
RHEL 9
0:4.10.0-76.el9_5.4
fixed
fence-agents-emerson
RHEL 9
0:4.10.0-76.el9_5.4
fixed
fence-agents-eps
RHEL 9
0:4.10.0-76.el9_5.4
fixed
fence-agents-gce
RHEL 9
0:4.10.0-76.el9_5.4
fixed
fence-agents-heuristics-ping
RHEL 9
0:4.10.0-76.el9_5.4
fixed
fence-agents-hpblade
RHEL 9
0:4.10.0-76.el9_5.4
fixed
fence-agents-ibm-powervs
RHEL 9
0:4.10.0-76.el9_5.4
fixed
fence-agents-ibm-vpc
RHEL 9
0:4.10.0-76.el9_5.4
fixed
fence-agents-ibmblade
RHEL 9
0:4.10.0-76.el9_5.4
fixed
fence-agents-ifmib
RHEL 9
0:4.10.0-76.el9_5.4
fixed
fence-agents-ilo-moonshot
RHEL 9
0:4.10.0-76.el9_5.4
fixed
fence-agents-ilo-mp
RHEL 9
0:4.10.0-76.el9_5.4
fixed
fence-agents-ilo-ssh
RHEL 9
0:4.10.0-76.el9_5.4
fixed
fence-agents-ilo2
RHEL 9
0:4.10.0-76.el9_5.4
fixed
fence-agents-intelmodular
RHEL 9
0:4.10.0-76.el9_5.4
fixed
fence-agents-ipdu
RHEL 9
0:4.10.0-76.el9_5.4
fixed
fence-agents-ipmilan
RHEL 9
0:4.10.0-76.el9_5.4
fixed
fence-agents-kdump
RHEL 9
0:4.10.0-76.el9_5.4
fixed
fence-agents-kubevirt
RHEL 9
0:4.10.0-76.el9_5.4
fixed
fence-agents-lpar
RHEL 9
0:4.10.0-76.el9_5.4
fixed
fence-agents-mpath
RHEL 9
0:4.10.0-76.el9_5.4
fixed
fence-agents-openstack
RHEL 9
0:4.10.0-76.el9_5.4
fixed
fence-agents-redfish
RHEL 9
0:4.10.0-76.el9_5.4
fixed
fence-agents-rhevm
RHEL 9
0:4.10.0-76.el9_5.4
fixed
fence-agents-rsa
RHEL 9
0:4.10.0-76.el9_5.4
fixed
fence-agents-rsb
RHEL 9
0:4.10.0-76.el9_5.4
fixed
fence-agents-sbd
RHEL 9
0:4.10.0-76.el9_5.4
fixed
fence-agents-scsi
RHEL 9
0:4.10.0-76.el9_5.4
fixed
fence-agents-virsh
RHEL 9
0:4.10.0-76.el9_5.4
fixed
fence-agents-vmware-rest
RHEL 9
0:4.10.0-76.el9_5.4
fixed
fence-agents-vmware-soap
RHEL 9
0:4.10.0-76.el9_5.4
fixed
fence-agents-wti
RHEL 9
0:4.10.0-76.el9_5.4
fixed
fence-agents-zvm
RHEL 9
0:4.10.0-76.el9_5.4
fixed
fence-virt
RHEL 9
0:4.10.0-76.el9_5.4
fixed
fence-virtd
RHEL 9
0:4.10.0-76.el9_5.4
fixed
fence-virtd-cpg
RHEL 9
0:4.10.0-76.el9_5.4
fixed
fence-virtd-libvirt
RHEL 9
0:4.10.0-76.el9_5.4
fixed
fence-virtd-multicast
RHEL 9
0:4.10.0-76.el9_5.4
fixed
fence-virtd-serial
RHEL 9
0:4.10.0-76.el9_5.4
fixed
fence-virtd-tcp
RHEL 9
0:4.10.0-76.el9_5.4
fixed
ha-cloud-support
RHEL 9
0:4.10.0-76.el9_5.4
fixed
python3-jinja2
RHEL 9
0:2.11.3-7.el9_5
fixed