CVE-2025-27516
ADVISORY - githubSummary
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.
Common Weakness Enumeration (CWE)
Improper Neutralization of Special Elements Used in a Template Engine
Improper Neutralization of Special Elements Used in a Template Engine
Improper Neutralization of Special Elements Used in a Template Engine
NIST
2
CVSS SCORE
5.4mediumGitHub
-
CVSS SCORE
5.4mediumAlpine
-
Debian
-
Ubuntu
2.0
CVSS SCORE
8.8mediumAlma
-
CVSS SCORE
N/AhighAmazon
-
CVSS SCORE
N/AhighAmazon
-
CVSS SCORE
N/AhighAmazon
-
CVSS SCORE
N/AhighAmazon
-
CVSS SCORE
N/AhighRed Hat
1.3
CVSS SCORE
7.3highRocky
-
CVSS SCORE
N/AhighRocky
-
CVSS SCORE
N/AhighRocky
-
CVSS SCORE
N/AhighOracle
-
CVSS SCORE
N/AhighOracle
-
CVSS SCORE
N/AhighOracle
-
CVSS SCORE
N/AhighOracle
-
CVSS SCORE
N/AhighChainguard
CGA-2h34-36gr-7wjw
-
Chainguard
CGA-3whm-xmcr-46qf
-
Chainguard
CGA-3x3w-qq6c-vp29
-
Chainguard
CGA-54q9-cvjw-rr77
-
Chainguard
CGA-5qcw-2pc9-gj58
-
Chainguard
CGA-7vqx-6v2v-7gxr
-
Chainguard
CGA-8fg5-vxmw-77p6
-
Chainguard
CGA-8gfh-2mj5-27qq
-
Chainguard
CGA-ch38-hm3p-vqfx
-
Chainguard
CGA-gwvh-jr95-fxxc
-
Chainguard
CGA-hw4r-mxqv-7jj9
-
Chainguard
CGA-m6wh-c9m7-3g8v
-
Chainguard
CGA-p346-mccf-rp28
-
Chainguard
CGA-pxmx-r998-7p4j
-
Chainguard
CGA-q74h-cfpr-qvcv
-
Chainguard
CGA-rc3c-cv49-w8jw
-
Chainguard
CGA-rrh5-7hg8-pgvf
-
Chainguard
CGA-v9x5-9f3j-vh44
-
Photon
CVE-2025-27516
-
CVSS SCORE
8.8highminimos
MINI-4c5h-cmcm-mv5q
-