CVE Tools

CVE-2024-56326

Jinja has a sandbox breakout through indirect reference to format method

CVE-2024-56326 affects Pallets Jinja (CVSS 7.8, High).

No known exploitation. EPSS puts it in the 43rd percentile. Fixed in 3.1.5.

Check it yourself

OpenVAS · 68 checks

e.g. OID 1.3.6.1.4.1.25623.1.0.127869

Run the check

Published Updated Sources: CVE.org, NVD, GitHub, BDU

What to do

Find your product and version, then upgrade to the build on the right.

  • Pallets JinjaAffected: < 3.1.5Upgrade to: not statedStated by: CVE record
  • PyPI jinja2Affected: < 3.1.5Upgrade to: 3.1.5Stated by: GitHub advisory
  • Palletsprojects JinjaAffected: < 3.1.5Upgrade to: 3.1.5Stated by: NVD
  • RED SOFT RED OSAffected: 7.3Upgrade to: not statedStated by: BDU
  • RusBITech-Astra Astra Linux Special EditionAffected: 1.7Upgrade to: not statedStated by: BDU

Versions as the sources state them. 5 more products have version data. Full version matrix after sign-in

Check it yourselfA free OpenVAS check exists for this CVE. Run it against your hosts.
Is your organisation exposed?Request a free pilot to establish which checks fit your systems.

SeguriScan is made by IntruForce, a cybersecurity company in Madrid, Spain. Links open intruforce.com.

What it is

From the CVE record

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.

In plain language

No plain-language summary for this CVE yet.

Exploitation

Where each signal puts this CVE on the scale from published to confirmed exploited.

EPSS43rd
CISA KEV

Not in the catalog. CISA has not confirmed exploitation.

Public exploits

No public exploit or proof of concept found in the sources we track.

EPSS

0.6% chance of exploitation activity in the next 30 days, which ranks it in the 43rd percentile of scored CVEs.

Exploit Prediction Scoring System, FIRST.org. A probability, not a confirmation.

Lifecycle

5 events over 549 days, from the signal feeds we watch.

  1. OpenVAS check added
  2. Patch availablerecord updated
  3. Publishedweakness classified

Affected products

Technical detail

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Scored 7.8 by NVD.

How it is reached

  • Attack Vector LocalRequires local access to the vulnerable system (e.g. local login, malicious file)
  • Attack Complexity LowNo special conditions — the attack can be reliably reproduced
  • Privileges Required LowRequires basic user-level privileges
  • User Interaction NoneNo user interaction needed — fully automated exploitation

Scope

  • Scope UnchangedImpact is limited to the vulnerable component itself

Impact if exploited

  • Confidentiality HighTotal information disclosure — all data in the component is compromised
  • Integrity HighTotal loss of integrity — attacker can modify any data in the component
  • Availability HighTotal denial of service — the component is completely unavailable

Weaknesses

Sources

Questions about CVE-2024-56326

Is CVE-2024-56326 being exploited?
No exploitation is confirmed and no public exploit is known. EPSS puts the chance of exploitation in the next 30 days at 0.6%.
Which versions are affected by CVE-2024-56326?
Jinja: < 3.1.5. Jinja2: < 3.1.5. Jinja: < 3.1.5. 7 more products are listed in the record.
How do I fix or mitigate CVE-2024-56326?
Upgrade to 3.1.5 or later. The advisory is on github.com.

Last updated

Related articles

All articles

Watch the software you run.

My Stack ranks new CVEs for your products by real-world exploitation, so the next serious one reaches you without reading every advisory.

We'll flag the next CVE, public exploit or patch for Jinja, not every advisory.