VDB

ALPINE-CVE-2024-56326

ALPINE-CVE-2024-56326 PUBLISHED CVSS 5.400000095367432 MEDIUM

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.

Risk Scores

CVSS v4.0
5.400000095367432
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/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

Affected Products

VendorProductVersions
Alpine:v3.23py3-jinja22.10-r0, 3.0.1-r0, 2.5.5-r1
Alpine:v3.18py3-jinja22.10-r1, 2.10-r2, 2.10-r3
Alpine:v3.20py3-jinja23.1.4-r0, 0, 2.10-r0
Alpine:v3.22py3-jinja22.5.5-r1, 3.1.1-r0, 3.0.3-r1
Alpine:v3.21py3-jinja22.10-r0, 2.5.5-r2, 2.8-r1
Alpine:v3.19py3-jinja22.8-r0, 2.8-r1, 2.11.1-r0

Timeline

  • Dec 23, 2024 CVE Published
  • Dec 3, 2025 CVE Updated
  • Apr 30, 2026 Distribution Patch
Open in Interactive Console →
$ Console Community · 100/wk Open console ›