
CVE catalog
CVE-2025-27516
Jinja2 vulnerabilities
- Severity
- High · CVSS 7.3
CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H - Published
- Source
- [NVD] · [CVE record]
- EPSS
- 0.51% · Oct 25, 2026
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.
Vulnerable and fixed packages
Distribution-reported package versions and fixes. These do not depend on matching against the OpenFactory package catalog.
| Distribution | Package | Release | Version | Status |
|---|---|---|---|---|
| Debian | jinja2 | sid | 3.1.6-4 | fixed |
| Debian | jinja2 | forky | 3.1.6-4 | fixed |
| Debian | jinja2 | trixie | 3.1.6-1 | fixed |
| Debian | jinja2 | bookworm | 3.1.2-1+deb12u3 | fixed |
| Ubuntu | jinja2 | noble | 3.1.2-1ubuntu1.3 | fixed |
| Ubuntu | python-jinja2-doc | noble | 3.1.2-1ubuntu1.3 | fixed |
| Ubuntu | python3-jinja2 | noble | 3.1.2-1ubuntu1.3 | fixed |
| Alpine | py3-jinja2 | 3.18 | 3.1.6-r0 | fixed |
| Alpine | py3-jinja2 | 3.19 | 3.1.6-r0 | fixed |
| Alpine | py3-jinja2 | 3.20 | 3.1.6-r0 | fixed |
| Alpine | py3-jinja2 | 3.21 | 3.1.6-r0 | fixed |
| Alpine | py3-jinja2 | 3.22 | 3.1.6-r0 | fixed |
| Alpine | py3-jinja2 | 3.23 | 3.1.6-r0 | fixed |
| Alpine | py3-jinja2 | 3.24 | 3.1.6-r0 | fixed |
| Suse | python-Jinja2 | linux enterprise high performance computing 15 sp3-ltss | 2.10.1-150000.3.21.1 | fixed |
| Suse | python-Jinja2 | linux enterprise high performance computing 15 sp4-espos | 2.10.1-150000.3.21.1 | fixed |
| Suse | python-Jinja2 | linux enterprise high performance computing 15 sp4-ltss | 2.10.1-150000.3.21.1 | fixed |
| Suse | python-Jinja2 | linux enterprise high performance computing 15 sp5-espos | 2.10.1-150000.3.21.1 | fixed |
| Suse | python-Jinja2 | linux enterprise high performance computing 15 sp5-ltss | 2.10.1-150000.3.21.1 | fixed |
| Suse | python-Jinja2 | linux enterprise server 15 sp3-ltss | 2.10.1-150000.3.21.1 | fixed |
| Suse | python-Jinja2 | linux enterprise server 15 sp4-ltss | 2.10.1-150000.3.21.1 | fixed |
| Suse | python-Jinja2 | linux enterprise server 15 sp5-ltss | 2.10.1-150000.3.21.1 | fixed |
| Suse | python-Jinja2 | linux enterprise server for sap applications 15 sp3 | 2.10.1-150000.3.21.1 | fixed |
| Suse | python-Jinja2 | linux enterprise server for sap applications 15 sp4 | 2.10.1-150000.3.21.1 | fixed |
| Suse | python-Jinja2 | linux enterprise server for sap applications 15 sp5 | 2.10.1-150000.3.21.1 | fixed |
| Suse | python-Jinja2 | enterprise storage 7.1 | 2.10.1-150000.3.21.1 | fixed |
| Suse | python-Jinja2 | linux micro 6.0 | 3.1.2-8.1 | fixed |
| Suse | python-Jinja2 | linux enterprise module for public cloud 15 sp4 | 3.1.2-150400.12.14.1 | fixed |
| Suse | python-Jinja2 | linux enterprise module for python 3 15 sp6 | 3.1.2-150400.12.14.1 | fixed |
| Opensuse | python-Jinja2 | leap 15.6 | 3.1.2-150400.12.14.1 | fixed |
| Ubuntu | jinja2 | pro | 2.9.6-1 | vulnerable |
| Ubuntu | jinja2 | pro | 2.10-1 | vulnerable |
| Ubuntu | jinja2 | pro | 2.10-1ubuntu0.18.04.1 | vulnerable |
| Ubuntu | jinja2 | pro | 2.10-1ubuntu0.18.04.1+esm1 | vulnerable |
| Ubuntu | jinja2 | pro | 2.10-1ubuntu0.18.04.1+esm2 | vulnerable |
| Ubuntu | jinja2 | pro | 2.10-1ubuntu0.18.04.1+esm3 | vulnerable |
| Ubuntu | jinja2 | pro | 2.10-1ubuntu0.18.04.1+esm4 | fixed |
| Ubuntu | jinja2 | 20.04 | 2.10-2ubuntu1 | vulnerable |
| Ubuntu | jinja2 | 20.04 | 2.10-2ubuntu2 | vulnerable |
| Ubuntu | jinja2 | 20.04 | 2.10.1-1ubuntu1 | vulnerable |
| Ubuntu | jinja2 | 20.04 | 2.10.1-2 | vulnerable |
| Ubuntu | jinja2 | 20.04 | 2.10.1-2ubuntu0.2 | vulnerable |
| Ubuntu | jinja2 | 20.04 | 2.10.1-2ubuntu0.3 | vulnerable |
| Ubuntu | jinja2 | 20.04 | 2.10.1-2ubuntu0.4 | vulnerable |
| Ubuntu | jinja2 | 20.04 | 2.10.1-2ubuntu0.5 | fixed |
| Ubuntu | jinja2 | 22.04 | 2.11.3-1 | vulnerable |
| Ubuntu | jinja2 | 22.04 | 3.0.1-2 | vulnerable |
| Ubuntu | jinja2 | 22.04 | 3.0.3-1 | vulnerable |
| Ubuntu | jinja2 | 22.04 | 3.0.3-1ubuntu0.1 | vulnerable |
| Ubuntu | jinja2 | 22.04 | 3.0.3-1ubuntu0.2 | vulnerable |
| Ubuntu | jinja2 | 22.04 | 3.0.3-1ubuntu0.3 | vulnerable |
| Ubuntu | jinja2 | 22.04 | 3.0.3-1ubuntu0.4 | fixed |
| Ubuntu | jinja2 | 24.04 | 3.1.2-1 | vulnerable |
| Ubuntu | jinja2 | 24.04 | 3.1.2-1ubuntu1 | vulnerable |
| Ubuntu | jinja2 | 24.04 | 3.1.2-1ubuntu1.1 | vulnerable |
| Ubuntu | jinja2 | 24.04 | 3.1.2-1ubuntu1.2 | vulnerable |
| Ubuntu | jinja2 | 24.04 | 3.1.2-1ubuntu1.3 | fixed |
| Suse | python-Jinja2 | linux enterprise micro 5.3 | 2.10.1-150000.3.21.1 | fixed |
| Suse | python-Jinja2 | linux enterprise micro 5.4 | 2.10.1-150000.3.21.1 | fixed |
| Suse | python-Jinja2 | linux enterprise micro 5.5 | 2.10.1-150000.3.21.1 | fixed |
| Suse | python-Jinja2 | linux enterprise module for basesystem 15 sp6 | 2.10.1-150000.3.21.1 | fixed |
| Suse | python-Jinja2 | linux enterprise micro 5.1 | 2.10.1-150000.3.21.1 | fixed |
| Suse | python-Jinja2 | linux enterprise micro 5.2 | 2.10.1-150000.3.21.1 | fixed |
Fixed-version evidence
| Distribution | Package | Type | Release | Fixed version | Urgency | Origin | Bugs |
|---|---|---|---|---|---|---|---|
| Debian | jinja2 | source | sid | 3.1.6-1 | not yet assigned | Not reported | [1099690] |
| Debian | jinja2 | source | forky | 3.1.6-1 | not yet assigned | Not reported | [1099690] |
| Debian | jinja2 | source | trixie | 3.1.6-1 | not yet assigned | Not reported | [1099690] |
| Debian | jinja2 | source | bookworm | 3.1.2-1+deb12u3 | not yet assigned | Not reported | [1099690] |
| Ubuntu | jinja2 | deb | noble | 3.1.2-1ubuntu1.3 | Not reported | Not reported | Not reported |
| Ubuntu | python-jinja2-doc | deb | noble | 3.1.2-1ubuntu1.3 | Not reported | Not reported | Not reported |
| Ubuntu | python3-jinja2 | deb | noble | 3.1.2-1ubuntu1.3 | Not reported | Not reported | Not reported |
| Alpine | py3-jinja2 | apk | 3.18 | 3.1.6-r0 | Not reported | ALPINE-CVE-2025-27516 | Not reported |
| Alpine | py3-jinja2 | apk | 3.19 | 3.1.6-r0 | Not reported | ALPINE-CVE-2025-27516 | Not reported |
| Alpine | py3-jinja2 | apk | 3.20 | 3.1.6-r0 | Not reported | ALPINE-CVE-2025-27516 | Not reported |
| Alpine | py3-jinja2 | apk | 3.21 | 3.1.6-r0 | Not reported | ALPINE-CVE-2025-27516 | Not reported |
| Alpine | py3-jinja2 | apk | 3.22 | 3.1.6-r0 | Not reported | ALPINE-CVE-2025-27516 | Not reported |
| Alpine | py3-jinja2 | apk | 3.23 | 3.1.6-r0 | Not reported | ALPINE-CVE-2025-27516 | Not reported |
| Alpine | py3-jinja2 | apk | 3.24 | 3.1.6-r0 | Not reported | ALPINE-CVE-2025-27516 | Not reported |
| Suse | python-Jinja2 | rpm | linux enterprise high performance computing 15 sp3-ltss | 2.10.1-150000.3.21.1 | Not reported | SUSE-SU-2025:1004-2 | Not reported |
| Suse | python-Jinja2 | rpm | linux enterprise high performance computing 15 sp4-espos | 2.10.1-150000.3.21.1 | Not reported | SUSE-SU-2025:1004-2 | Not reported |
| Suse | python-Jinja2 | rpm | linux enterprise high performance computing 15 sp4-ltss | 2.10.1-150000.3.21.1 | Not reported | SUSE-SU-2025:1004-2 | Not reported |
| Suse | python-Jinja2 | rpm | linux enterprise high performance computing 15 sp5-espos | 2.10.1-150000.3.21.1 | Not reported | SUSE-SU-2025:1004-2 | Not reported |
| Suse | python-Jinja2 | rpm | linux enterprise high performance computing 15 sp5-ltss | 2.10.1-150000.3.21.1 | Not reported | SUSE-SU-2025:1004-2 | Not reported |
| Suse | python-Jinja2 | rpm | linux enterprise server 15 sp3-ltss | 2.10.1-150000.3.21.1 | Not reported | SUSE-SU-2025:1004-2 | Not reported |
| Suse | python-Jinja2 | rpm | linux enterprise server 15 sp4-ltss | 2.10.1-150000.3.21.1 | Not reported | SUSE-SU-2025:1004-2 | Not reported |
| Suse | python-Jinja2 | rpm | linux enterprise server 15 sp5-ltss | 2.10.1-150000.3.21.1 | Not reported | SUSE-SU-2025:1004-2 | Not reported |
| Suse | python-Jinja2 | rpm | linux enterprise server for sap applications 15 sp3 | 2.10.1-150000.3.21.1 | Not reported | SUSE-SU-2025:1004-2 | Not reported |
| Suse | python-Jinja2 | rpm | linux enterprise server for sap applications 15 sp4 | 2.10.1-150000.3.21.1 | Not reported | SUSE-SU-2025:1004-2 | Not reported |
| Suse | python-Jinja2 | rpm | linux enterprise server for sap applications 15 sp5 | 2.10.1-150000.3.21.1 | Not reported | SUSE-SU-2025:1004-2 | Not reported |
| Suse | python-Jinja2 | rpm | enterprise storage 7.1 | 2.10.1-150000.3.21.1 | Not reported | SUSE-SU-2025:1004-2 | Not reported |
| Suse | python-Jinja2 | rpm | linux micro 6.0 | 3.1.2-8.1 | Not reported | SUSE-SU-2025:20156-1 | Not reported |
| Suse | python-Jinja2 | rpm | linux enterprise module for public cloud 15 sp4 | 3.1.2-150400.12.14.1 | Not reported | SUSE-SU-2025:0956-1 | Not reported |
| Suse | python-Jinja2 | rpm | linux enterprise module for python 3 15 sp6 | 3.1.2-150400.12.14.1 | Not reported | SUSE-SU-2025:0956-1 | Not reported |
| Opensuse | python-Jinja2 | rpm | leap 15.6 | 3.1.2-150400.12.14.1 | Not reported | SUSE-SU-2025:0956-1 | Not reported |
| Ubuntu | jinja2 | deb | pro | 2.10-1ubuntu0.18.04.1+esm4 | Not reported | UBUNTU-CVE-2025-27516 | Not reported |
| Ubuntu | jinja2 | deb | 20.04 | 2.10.1-2ubuntu0.5 | Not reported | UBUNTU-CVE-2025-27516 | Not reported |
| Ubuntu | jinja2 | deb | 22.04 | 3.0.3-1ubuntu0.4 | Not reported | UBUNTU-CVE-2025-27516 | Not reported |
| Ubuntu | jinja2 | deb | 24.04 | 3.1.2-1ubuntu1.3 | Not reported | UBUNTU-CVE-2025-27516 | Not reported |
| Suse | python-Jinja2 | rpm | linux enterprise micro 5.3 | 2.10.1-150000.3.21.1 | Not reported | SUSE-SU-2025:1004-1 | Not reported |
| Suse | python-Jinja2 | rpm | linux enterprise micro 5.4 | 2.10.1-150000.3.21.1 | Not reported | SUSE-SU-2025:1004-1 | Not reported |
| Suse | python-Jinja2 | rpm | linux enterprise micro 5.5 | 2.10.1-150000.3.21.1 | Not reported | SUSE-SU-2025:1004-1 | Not reported |
| Suse | python-Jinja2 | rpm | linux enterprise module for basesystem 15 sp6 | 2.10.1-150000.3.21.1 | Not reported | SUSE-SU-2025:1004-1 | Not reported |
| Suse | python-Jinja2 | rpm | linux enterprise micro 5.1 | 2.10.1-150000.3.21.1 | Not reported | SUSE-SU-2025:1004-1 | Not reported |
| Suse | python-Jinja2 | rpm | linux enterprise micro 5.2 | 2.10.1-150000.3.21.1 | Not reported | SUSE-SU-2025:1004-1 | Not reported |
OpenFactory catalog packages
[Debian 12 (Bookworm)]
- [python3-jinja2]Fixed
Source package: [jinja2]
Details (2)
3.1.2-1+deb12u3· all · bookwormFixed · Fixed:
3.1.2-1+deb12u3usn · jinja2 · debian · bookworm; usn · jinja2 · debian · 12
3.1.2-1+deb12u3· all · bookwormFixed · Fixed:
3.1.2-1+deb12u3usn · jinja2 · debian · bookworm; usn · jinja2 · debian · 12
- [python-jinja2-doc]Fixed
Source package: [jinja2]
Details (2)
3.1.2-1+deb12u3· all · bookwormFixed · Fixed:
3.1.2-1+deb12u3usn · jinja2 · debian · bookworm; usn · jinja2 · debian · 12
3.1.2-1+deb12u3· all · bookwormFixed · Fixed:
3.1.2-1+deb12u3usn · jinja2 · debian · bookworm; usn · jinja2 · debian · 12
[Debian 13 (Trixie)]
- [python3-jinja2]Fixed
Source package: [jinja2]
Details (2)
3.1.6-1· all · trixieFixed · Fixed:
3.1.6-1usn · jinja2 · debian · 13
3.1.6-1· all · trixieFixed · Fixed:
3.1.6-1usn · jinja2 · debian · 13
- [python-jinja2-doc]Fixed
Source package: [jinja2]
Details (2)
3.1.6-1· all · trixieFixed · Fixed:
3.1.6-1usn · jinja2 · debian · 13
3.1.6-1· all · trixieFixed · Fixed:
3.1.6-1usn · jinja2 · debian · 13
Observed:
References
- [https://ftp.suse.com/pub/projects/security/csaf/rhsa-2025_3388.json]
- [https://osv.dev/vulnerability/ALPINE-CVE-2025-27516]
- [https://osv.dev/vulnerability/DEBIAN-CVE-2025-27516]
- [https://osv.dev/vulnerability/SUSE-SU-2025:0956-1]
- [https://osv.dev/vulnerability/SUSE-SU-2025:1004-1]
- [https://osv.dev/vulnerability/SUSE-SU-2025:1004-2]
- [https://osv.dev/vulnerability/SUSE-SU-2025:20156-1]
- [https://osv.dev/vulnerability/UBUNTU-CVE-2025-27516]
- [https://security-tracker.debian.org/tracker/CVE-2025-27516]
- [https://security.access.redhat.com/data/csaf/v2/vex/2025/cve-2025-27516.json]
- [https://ubuntu.com/security/notices/USN-7343-1]
- [https://wid.cert-bund.de/.well-known/csaf/white/2025/wid-sec-w-2025-0524.json]
[CERT-Bund public advisories] · [Debian Security Tracker] · [FIRST EPSS] · [OSV Package Vulnerability Database] · [Red Hat security advisories and VEX] · [SUSE security advisories and VEX] · [Ubuntu Security Notices (USN)]