Arbitrary Code Execution in Jinja Templating Engine Affecting Pallets
CVE-2025-27516
5.4MEDIUM
What is CVE-2025-27516?
An oversight in the Jinja templating engine's sandboxed environment allows for arbitrary Python code execution by using the |attr filter in templates controlled by an attacker. This occurs in versions prior to 3.1.6, where the |attr filter improperly interacts with the sandbox, enabling the exploitation of untrusted templates. Applications leveraging Jinja must ensure they upgrade to version 3.1.6 or later to mitigate this risk, as the fix prevents bypassing the environment's attribute lookup, enhancing security against potential code execution threats.
Affected Version(s)
jinja < 3.1.6
References
CVSS V4
Score:
5.4
Severity:
MEDIUM
Confidentiality:
High
Integrity:
High
Availability:
High
Attack Vector:
Local
Attack Complexity:
Low
Attack Required:
Physical
Privileges Required:
Undefined
User Interaction:
Unknown
Timeline
Vulnerability published
Vulnerability Reserved