Advisory record · GHSA-q2x7-8rv6-6q7h

Jinja has a sandbox breakout through indirect reference to format method

CVSS 5.4 MediumEPSS 0.0052 · 44th percentile

Published by the GitHub Advisory Database at 23 Dec 2024, 17:56 UTC. agentprime has not analysed this yet, so whether it affects any app is not known.

PackageEcosystemAffectedFixed in
jinja2PyPI<3.1.53.1.5
Identifiers
GHSA-q2x7-8rv6-6q7h · CVE-2024-56326 · PYSEC-2026-1475
Weakness (CWE)
CWE-693 · CWE-1336
Published
23 Dec 2024
Updated
10 Sept 2026

Machine-written summary

Summary written by Claude Haiku from the source advisory. Not reviewed by a person.

Jinja2 versions before 3.1.5 are vulnerable to a sandbox breakout in the Jinja sandboxed environment, which fails to detect indirect calls to the str.format method. An attacker who can control the content of a template can store a reference to a malicious string's format method and pass it to a filter that calls it, executing arbitrary Python code; this requires custom filters, since none are built into Jinja. Upgrade jinja2 to version 3.1.5 or later.

Written 5 Nov 2026.

Not analysed yet

We haven’t published our analysis of this Advisory yet. Once a person has reviewed it, this page will say what’s vulnerable, what has to be true for your app to be affected, and how to check.

Severity and exploitation

ScoreRatingCVSSVectorSource
5.4 Medium 4.0 CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N CNA (GitHub_M)
  • CISA KEV Not listed.
  • EPSS 0.0052, the 44th percentile, on 11 Nov 2026: FIRST’s estimate of the chance of exploitation in the next 30 days.

Timeline

  1. 21 Dec 2024, 18:31 UTC Published by the maintainers as a GitHub repository advisory
  2. 31 Oct 2026, 14:35 UTC First seen by agentprime
  3. 31 Oct 2026, 14:35 UTC Confirmed by OSV

Sources

Facts on this page come from the GitHub Advisory Database (CC-BY 4.0), OSV and the other sources listed, as published. We don’t reproduce full advisory descriptions, which can contain exploit code.