cbcvebase.
CVE-2024-56326
published 2024-12-23

CVE-2024-56326: 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…

PriorityP344high7.8CVSS 3.1
AVLACLPRLUINSUCHIHAH
EPSS
0.52%
41.1th percentile
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.

Affected

26 ranges· showing 25
VendorProductVersion rangeFixed in
debianjinja2< jinja2 3.1.2-1+deb12u2 (bookworm)jinja2 3.1.2-1+deb12u2 (bookworm)
msrcazl3_nodejs_20.14.0-8_on_azure_linux_3.0
msrcazl3_python-jinja2_3.1.2-2_on_azure_linux_3.0
msrcazl3_python-jinja2_3.1.2-3_on_azure_linux_3.0
msrccbl2_nodejs18_18.20.3-5_on_cbl_mariner_2.0
msrccbl2_python-jinja2_3.0.3-5_on_cbl_mariner_2.0
msrccbl2_python-jinja2_3.0.3-7_on_cbl_mariner_2.0
palletsjinja< 3.1.53.1.5
palletsprojectsjinja< 3.1.53.1.5
pocoojinja2>= 0 < 2.11.3-1+deb11u32.11.3-1+deb11u3
pocoojinja2>= 0 < 3.1.2-1+deb12u23.1.2-1+deb12u2
pocoojinja2>= 0 < 3.1.5-13.1.5-1
pocoojinja2>= 0 < 3.1.5-13.1.5-1
pocoojinja2>= 0 < 3.1.53.1.5
pocoojinja2>= 0 < 2.10.1-2ubuntu0.52.10.1-2ubuntu0.5
pocoojinja2>= 0 < 2.10.1-2ubuntu0.42.10.1-2ubuntu0.4
pocoojinja2>= 0 < 2.10.1-2ubuntu0.62.10.1-2ubuntu0.6
pocoojinja2>= 0 < 3.0.3-1ubuntu0.43.0.3-1ubuntu0.4
pocoojinja2>= 0 < 3.0.3-1ubuntu0.33.0.3-1ubuntu0.3
pocoojinja2>= 0 < 3.1.2-1ubuntu1.33.1.2-1ubuntu1.3
pocoojinja2>= 0 < 3.1.2-1ubuntu1.23.1.2-1ubuntu1.2
pocoojinja2>= 0 < 2.7.2-2ubuntu0.1~esm62.7.2-2ubuntu0.1~esm6
pocoojinja2>= 0 < 2.8-1ubuntu0.1+esm52.8-1ubuntu0.1+esm5
pocoojinja2>= 0 < 2.10-1ubuntu0.18.04.1+esm42.10-1ubuntu0.18.04.1+esm4
pocoojinja2>= 0 < 2.10-1ubuntu0.18.04.1+esm32.10-1ubuntu0.18.04.1+esm3

CVSS provenance

nvdv3.17.8HIGHCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
nvdv4.05.4MEDIUMCVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
osv5.4MEDIUM
vendor_ubuntu8.8HIGH
vendor_msrc7.8HIGH
vendor_debian5.4MEDIUM
vendor_redhat5.4MEDIUM
Stop checking back — get the weekly exploitation signal.

Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.