7.8

CVE-2024-56326: Jinja has a sandbox breakout through indirect reference to format method

Modified
AliasesALPINE-CVE-2024-56326MGASA-2025-0050SUSE-SU-2025:0016-1
Published 23-12-2024Last modified 03-11-2025

Vulnerability summary

CVE-2024-56326 is a high (CVSS 7.8) Protection Mechanism Failure vulnerability in pallets jinja. EPSS estimates a 0.52% chance of exploitation in the next 30 days, higher than 44.3% of scored vulnerabilities.

Priority
Routine

Not severe (CVSS 5.4, local access); no exploitation reported by the 5 checked sources

Source freshness unavailable

How is this decided?
CVSS score
7.8/10
010
High · v3.1 (CVE.org)
EPSS score
0.52%
0%100%
Low · 0.00 pp in 30 days
KEVNot listedNot listed by any tracked catalog.
RansomwareNot flaggedNo ransomware use recorded.
Public exploits0No public exploits recorded

Advisory lineage

Upstream 0 · Downstream 22 · Related 25

Timeline

  1. 23-12-2024
    PublishedVulnerability first disclosed.
  2. 03-11-2025
    Last modifiedVulnerability information updated.

Description

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.

CVSS metrics

13 scores · 9 sources · 2 versions

EPSS trend

Probability

0.52%

Chance of exploitation in the next 30 days

Percentile

44%

Versus all other CVEs

30-day change

No change 0.00 pp

From 0.52% on 04-10-2026

04-10-202603-11-2026

Known exploited

Compare KEV catalogs
CISA KEV

Not in the CISA KEV catalog.

ENISA CNW

Not in the ENISA CNW catalog.

CIRCL

Not in the CIRCL catalog.

Public exploits

0 found

No public exploits indexed.

Weaknesses

CWE · root cause

Affected systems

Version check

Known conditions: local access, low-privilege account, user interaction (CVSS vector). Other conditions: not stated in public data.

Chainguard35 products
  • airflow< 2.10.4-r2
  • airflow-bitnami-compat< 2.10.4-r2
  • ansible-operator< 1.37.1-r0
  • ansible-operator-compat< 1.37.1-r0
  • apache-beam-python-3.11-sdk< 2.61.0-r1
Wolfi29 products
  • airflow< 2.10.4-r2
  • airflow-bitnami-compat< 2.10.4-r2
  • checkov< 3.2.432-r0
  • dask-gateway< 2024.1.0-r13
  • emissary< 3.9.1-r8
Suse22 products
  • python-Jinja2&distro=SUSE Enterprise Storage 7.1< 2.10.1-150000.3.18.1
  • python-Jinja2&distro=SUSE Linux Enterprise High Performance Computing 15 SP3-LTSS< 2.10.1-150000.3.18.1
  • python-Jinja2&distro=SUSE Linux Enterprise High Performance Computing 15 SP4-ESPOS< 2.10.1-150000.3.18.1
  • python-Jinja2&distro=SUSE Linux Enterprise High Performance Computing 15 SP4-LTSS< 2.10.1-150000.3.18.1
  • python-Jinja2&distro=SUSE Linux Enterprise High Performance Computing 15 SP5-ESPOS< 2.10.1-150000.3.18.1
Opensuse2 products
  • python-Jinja2&distro=openSUSE Leap 15.5< 2.10.1-150000.3.18.1
  • python-Jinja2&distro=openSUSE Leap Micro 5.5< 2.10.1-150000.3.18.1
Redhat2 products
  • python-jinja2< 0:2.11.3-7.el9_5 | < 0:2.10.1-6.el8_10 | < 0:2.11.3-6.el9_4 | < 0:2.10.1-4.el8_8.1 | < 0:2.10.1-4.el8_6.1 | < 0:2.11.3-4.el9_0.1 | < 0:2.11.3-4.el9_2.1 | < 0:2.10.1-2.el8_4.1 | < 0:2.7.2-5.el7_9 | < 0:2.10.1-2.el8_2.3
  • python3-jinja2< 0:2.11.3-7.el9_5 | < 0:2.10.1-6.el8_10 | < 0:2.11.3-6.el9_4 | < 0:2.10.1-4.el8_8.1 | < 0:2.10.1-4.el8_6.1 | < 0:2.11.3-4.el9_0.1 | < 0:2.11.3-4.el9_2.1 | < 0:2.10.1-2.el8_4.1 | < 0:2.10.1-2.el8_2.3
Alpine1 product
  • py3-jinja2< 3.1.5-r0
Debian1 product
  • jinja2< 3.1.2-1+deb12u2 | < 3.1.5-1
Mageia1 product
  • python-jinja2< 3.1.5-1.mga9
Pallets1 product
Palletsprojects1 product
PyPI1 product
  • jinja2< 3.1.5
Ubuntu1 product
  • jinja2< 2.7.2-2ubuntu0.1~esm6 | < 2.8-1ubuntu0.1+esm5 | < 2.10-1ubuntu0.18.04.1+esm3 | < 2.10.1-2ubuntu0.4 | < 3.0.3-1ubuntu0.3 | < 3.1.2-1ubuntu1.2

12 vendors · 97 products

References

46 links
Show all 46 references