Source: jinja2 Version: 3.1.5-2 Severity: important Tags: security upstream X-Debbugs-Cc: car...@debian.org, Debian Security Team <t...@security.debian.org>
Hi, The following vulnerability was published for jinja2. CVE-2025-27516[0]: | 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 | 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. If you fix the vulnerability please also make sure to include the CVE (Common Vulnerabilities & Exposures) id in your changelog entry. For further information see: [0] https://security-tracker.debian.org/tracker/CVE-2025-27516 https://www.cve.org/CVERecord?id=CVE-2025-27516 [1] https://github.com/pallets/jinja/security/advisories/GHSA-cpwx-vrp4-4pq7 [2] https://github.com/pallets/jinja/commit/065334d1ee5b7210e1a0a93c37238c86858f2af7 Please adjust the affected versions in the BTS as needed. Regards, Salvatore