CVE-2025-27516

J

inja 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.

Configurations

Configuration 1 (hide)

cpe:2.3:a:palletsprojects:jinja:*:*:*:*:*:*:*:*

Configuration 2 (hide)

cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*

History

03 Nov 2025, 20:18

Type Values Removed Values Added
References
  • () https://lists.debian.org/debian-lts-announce/2025/04/msg00022.html -

22 Sep 2025, 18:49

Type Values Removed Values Added
CVSS v2 : unknown
v3 : unknown
v2 : unknown
v3 : 8.8
First Time Palletsprojects jinja
Debian
Debian debian Linux
Palletsprojects
References () https://github.com/pallets/jinja/commit/90457bbf33b8662926ae65cdde4c4c32e756e403 - () https://github.com/pallets/jinja/commit/90457bbf33b8662926ae65cdde4c4c32e756e403 - Patch
References () https://github.com/pallets/jinja/security/advisories/GHSA-cpwx-vrp4-4pq7 - () https://github.com/pallets/jinja/security/advisories/GHSA-cpwx-vrp4-4pq7 - Vendor Advisory
References () https://lists.debian.org/debian-lts-announce/2025/04/msg00045.html - () https://lists.debian.org/debian-lts-announce/2025/04/msg00045.html - Mailing List, Third Party Advisory
CPE cpe:2.3:a:palletsprojects:jinja:*:*:*:*:*:*:*:*
cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*

01 May 2025, 01:15

Type Values Removed Values Added
References
  • () https://lists.debian.org/debian-lts-announce/2025/04/msg00045.html -

05 Mar 2025, 21:15

Type Values Removed Values Added
New CVE

Information

Published : 2025-03-05 21:15

Updated : 2025-11-03 20:18


NVD link : CVE-2025-27516

Mitre link : CVE-2025-27516

CVE.ORG link : CVE-2025-27516


JSON object : View

CWE
CWE-1336

Improper Neutralization of Special Elements Used in a Template Engine