Jinja2 -- Sandbox breakout through attr filter selecting format method
· CVE-2025-27516 · VuXML entry
[email protected] reports: 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 …
Affected versions
- py38-Jinja2, py39-Jinja2, py310-Jinja2, py311-Jinja2 < 3.1.6
By system
0 still vulnerable, 1 fixed. Where VuXML applies (FreeBSD, DragonFly, FreeBSD's derivatives) a port is vulnerable while its version is in a range; pkgsrc says itself whether it lists a CVE of this advisory; OpenBSD and MidnightBSD keep no list this site reads, so their row is only an estimate: FreeBSD's ranges applied to upstream's version.
| System | Port | Version | State | Fixed |
|---|---|---|---|---|
| DragonFly | devel/py-Jinja2 | 3.1.6 | fixed | |
| MidnightBSD | devel/py-Jinja2 | 3.1.6_1 | out of range, by version |