CVE-2025-27516Improper Neutralization of Special Elements Used in a Template Engine in Jinja

Severity
5.4MEDIUMNVD
EPSS
0.2%
top 63.77%
CISA KEV
Not in KEV
Exploit
No known exploits
Timeline
PublishedMar 5
Latest updateJul 15

Description

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 c

CVSS vector

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

Affected Packages4 packages

PyPIpocoo/jinja2< 3.1.6
CVEListV5pallets/jinja< 3.1.6
Debianpocoo/jinja2< 2.11.3-1+deb11u3+3

Also affects: Debian Linux 11.0

Patches

🔴Vulnerability Details

4
CVEList
Jinja sandbox breakout through attr filter selecting format method2025-03-05
OSV
Jinja2 vulnerable to sandbox breakout through attr filter selecting format method2025-03-05
OSV
CVE-2025-27516: Jinja is an extensible templating engine2025-03-05
GHSA
Jinja2 vulnerable to sandbox breakout through attr filter selecting format method2025-03-05

📋Vendor Advisories

6
Oracle
Oracle Oracle Communications Risk Matrix: Configuration (Jinja) — CVE-2025-275162025-07-15
Oracle
Oracle Oracle Communications Risk Matrix: Alarms, KPI, and Measurements (Jinja) — CVE-2025-275162025-04-15
Ubuntu
Jinja2 vulnerabilities2025-03-11
Microsoft
Jinja sandbox breakout through attr filter selecting format method2025-03-11
Red Hat
jinja2: Jinja sandbox breakout through attr filter selecting format method2025-03-05
CVE-2025-27516 — Pallets Jinja vulnerability | cvebase