VDB

ALPINE-CVE-2025-27516

ALPINE-CVE-2025-27516 PUBLISHED CVSS 8.800000190734863 HIGH

Jinja is an extensible templating engine. Prior to 3.1.6, an oversight in how the Jinja sandboxed environment interacts with the |attr filter 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 use the |attr filter to get a reference to a string's plain format method, bypassing the sandbox. After the fix, the |attr filter no longer bypasses the environment's attribute lookup. This vulnerability is fixed in 3.1.6.

Risk Scores

CVSS v3.1
8.800000190734863
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H

Affected Products

VendorProductVersions
Alpine:v3.20py3-jinja23.0.1-r1, 3.1.5-r0, 3.1.4-r0
Alpine:v3.22py3-jinja23.1.3-r0, 0, 2.10-r0
Alpine:v3.23py3-jinja23.1.2-r2, 3.1.2-r1, 3.1.2-r0
Alpine:v3.21py3-jinja23.1.2-r2, 2.10-r2, 2.10.1-r0
Alpine:v3.19py3-jinja22.10.3-r0, 2.10-r2, 2.11.2-r0
Alpine:v3.18py3-jinja22.10-r0, 2.10-r1, 2.10-r2

Timeline

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