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.
No public exploit knownFix3.1.5Upgrade to this build
e.g. OID 1.3.6.1.4.1.25623.1.0.127869
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
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.
- 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.
- OpenVAS check added
- Patch availablerecord updated
- Publishedweakness classified
Affected products
And 4 more affected products. See all after sign-in
Technical detail
CVSS 3.1 vector
Open in the CVSS calculatorCVSS: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 articlesWatch 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.
A free account adds
- The full version matrix and every affected product
- Exploit links, proofs of concept and Metasploit modules
- Email alerts for the products you watch
- The same data over REST API, MCP and CLI