CVE catalog

CVE-2025-27516

Jinja2 vulnerabilities

[CVE catalog]

Severity
High · CVSS 7.3CVSS: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.

DistributionPackageReleaseVersionStatus
Debianjinja2sid3.1.6-4fixed
Debianjinja2forky3.1.6-4fixed
Debianjinja2trixie3.1.6-1fixed
Debianjinja2bookworm3.1.2-1+deb12u3fixed
Ubuntujinja2noble3.1.2-1ubuntu1.3fixed
Ubuntupython-jinja2-docnoble3.1.2-1ubuntu1.3fixed
Ubuntupython3-jinja2noble3.1.2-1ubuntu1.3fixed
Alpinepy3-jinja23.183.1.6-r0fixed
Alpinepy3-jinja23.193.1.6-r0fixed
Alpinepy3-jinja23.203.1.6-r0fixed
Alpinepy3-jinja23.213.1.6-r0fixed
Alpinepy3-jinja23.223.1.6-r0fixed
Alpinepy3-jinja23.233.1.6-r0fixed
Alpinepy3-jinja23.243.1.6-r0fixed
Susepython-Jinja2linux enterprise high performance computing 15 sp3-ltss2.10.1-150000.3.21.1fixed
Susepython-Jinja2linux enterprise high performance computing 15 sp4-espos2.10.1-150000.3.21.1fixed
Susepython-Jinja2linux enterprise high performance computing 15 sp4-ltss2.10.1-150000.3.21.1fixed
Susepython-Jinja2linux enterprise high performance computing 15 sp5-espos2.10.1-150000.3.21.1fixed
Susepython-Jinja2linux enterprise high performance computing 15 sp5-ltss2.10.1-150000.3.21.1fixed
Susepython-Jinja2linux enterprise server 15 sp3-ltss2.10.1-150000.3.21.1fixed
Susepython-Jinja2linux enterprise server 15 sp4-ltss2.10.1-150000.3.21.1fixed
Susepython-Jinja2linux enterprise server 15 sp5-ltss2.10.1-150000.3.21.1fixed
Susepython-Jinja2linux enterprise server for sap applications 15 sp32.10.1-150000.3.21.1fixed
Susepython-Jinja2linux enterprise server for sap applications 15 sp42.10.1-150000.3.21.1fixed
Susepython-Jinja2linux enterprise server for sap applications 15 sp52.10.1-150000.3.21.1fixed
Susepython-Jinja2enterprise storage 7.12.10.1-150000.3.21.1fixed
Susepython-Jinja2linux micro 6.03.1.2-8.1fixed
Susepython-Jinja2linux enterprise module for public cloud 15 sp43.1.2-150400.12.14.1fixed
Susepython-Jinja2linux enterprise module for python 3 15 sp63.1.2-150400.12.14.1fixed
Opensusepython-Jinja2leap 15.63.1.2-150400.12.14.1fixed
Ubuntujinja2pro2.9.6-1vulnerable
Ubuntujinja2pro2.10-1vulnerable
Ubuntujinja2pro2.10-1ubuntu0.18.04.1vulnerable
Ubuntujinja2pro2.10-1ubuntu0.18.04.1+esm1vulnerable
Ubuntujinja2pro2.10-1ubuntu0.18.04.1+esm2vulnerable
Ubuntujinja2pro2.10-1ubuntu0.18.04.1+esm3vulnerable
Ubuntujinja2pro2.10-1ubuntu0.18.04.1+esm4fixed
Ubuntujinja220.042.10-2ubuntu1vulnerable
Ubuntujinja220.042.10-2ubuntu2vulnerable
Ubuntujinja220.042.10.1-1ubuntu1vulnerable
Ubuntujinja220.042.10.1-2vulnerable
Ubuntujinja220.042.10.1-2ubuntu0.2vulnerable
Ubuntujinja220.042.10.1-2ubuntu0.3vulnerable
Ubuntujinja220.042.10.1-2ubuntu0.4vulnerable
Ubuntujinja220.042.10.1-2ubuntu0.5fixed
Ubuntujinja222.042.11.3-1vulnerable
Ubuntujinja222.043.0.1-2vulnerable
Ubuntujinja222.043.0.3-1vulnerable
Ubuntujinja222.043.0.3-1ubuntu0.1vulnerable
Ubuntujinja222.043.0.3-1ubuntu0.2vulnerable
Ubuntujinja222.043.0.3-1ubuntu0.3vulnerable
Ubuntujinja222.043.0.3-1ubuntu0.4fixed
Ubuntujinja224.043.1.2-1vulnerable
Ubuntujinja224.043.1.2-1ubuntu1vulnerable
Ubuntujinja224.043.1.2-1ubuntu1.1vulnerable
Ubuntujinja224.043.1.2-1ubuntu1.2vulnerable
Ubuntujinja224.043.1.2-1ubuntu1.3fixed
Susepython-Jinja2linux enterprise micro 5.32.10.1-150000.3.21.1fixed
Susepython-Jinja2linux enterprise micro 5.42.10.1-150000.3.21.1fixed
Susepython-Jinja2linux enterprise micro 5.52.10.1-150000.3.21.1fixed
Susepython-Jinja2linux enterprise module for basesystem 15 sp62.10.1-150000.3.21.1fixed
Susepython-Jinja2linux enterprise micro 5.12.10.1-150000.3.21.1fixed
Susepython-Jinja2linux enterprise micro 5.22.10.1-150000.3.21.1fixed

Fixed-version evidence

DistributionPackageTypeReleaseFixed versionUrgencyOriginBugs
Debianjinja2sourcesid3.1.6-1not yet assignedNot reported[1099690]
Debianjinja2sourceforky3.1.6-1not yet assignedNot reported[1099690]
Debianjinja2sourcetrixie3.1.6-1not yet assignedNot reported[1099690]
Debianjinja2sourcebookworm3.1.2-1+deb12u3not yet assignedNot reported[1099690]
Ubuntujinja2debnoble3.1.2-1ubuntu1.3Not reportedNot reportedNot reported
Ubuntupython-jinja2-docdebnoble3.1.2-1ubuntu1.3Not reportedNot reportedNot reported
Ubuntupython3-jinja2debnoble3.1.2-1ubuntu1.3Not reportedNot reportedNot reported
Alpinepy3-jinja2apk3.183.1.6-r0Not reportedALPINE-CVE-2025-27516Not reported
Alpinepy3-jinja2apk3.193.1.6-r0Not reportedALPINE-CVE-2025-27516Not reported
Alpinepy3-jinja2apk3.203.1.6-r0Not reportedALPINE-CVE-2025-27516Not reported
Alpinepy3-jinja2apk3.213.1.6-r0Not reportedALPINE-CVE-2025-27516Not reported
Alpinepy3-jinja2apk3.223.1.6-r0Not reportedALPINE-CVE-2025-27516Not reported
Alpinepy3-jinja2apk3.233.1.6-r0Not reportedALPINE-CVE-2025-27516Not reported
Alpinepy3-jinja2apk3.243.1.6-r0Not reportedALPINE-CVE-2025-27516Not reported
Susepython-Jinja2rpmlinux enterprise high performance computing 15 sp3-ltss2.10.1-150000.3.21.1Not reportedSUSE-SU-2025:1004-2Not reported
Susepython-Jinja2rpmlinux enterprise high performance computing 15 sp4-espos2.10.1-150000.3.21.1Not reportedSUSE-SU-2025:1004-2Not reported
Susepython-Jinja2rpmlinux enterprise high performance computing 15 sp4-ltss2.10.1-150000.3.21.1Not reportedSUSE-SU-2025:1004-2Not reported
Susepython-Jinja2rpmlinux enterprise high performance computing 15 sp5-espos2.10.1-150000.3.21.1Not reportedSUSE-SU-2025:1004-2Not reported
Susepython-Jinja2rpmlinux enterprise high performance computing 15 sp5-ltss2.10.1-150000.3.21.1Not reportedSUSE-SU-2025:1004-2Not reported
Susepython-Jinja2rpmlinux enterprise server 15 sp3-ltss2.10.1-150000.3.21.1Not reportedSUSE-SU-2025:1004-2Not reported
Susepython-Jinja2rpmlinux enterprise server 15 sp4-ltss2.10.1-150000.3.21.1Not reportedSUSE-SU-2025:1004-2Not reported
Susepython-Jinja2rpmlinux enterprise server 15 sp5-ltss2.10.1-150000.3.21.1Not reportedSUSE-SU-2025:1004-2Not reported
Susepython-Jinja2rpmlinux enterprise server for sap applications 15 sp32.10.1-150000.3.21.1Not reportedSUSE-SU-2025:1004-2Not reported
Susepython-Jinja2rpmlinux enterprise server for sap applications 15 sp42.10.1-150000.3.21.1Not reportedSUSE-SU-2025:1004-2Not reported
Susepython-Jinja2rpmlinux enterprise server for sap applications 15 sp52.10.1-150000.3.21.1Not reportedSUSE-SU-2025:1004-2Not reported
Susepython-Jinja2rpmenterprise storage 7.12.10.1-150000.3.21.1Not reportedSUSE-SU-2025:1004-2Not reported
Susepython-Jinja2rpmlinux micro 6.03.1.2-8.1Not reportedSUSE-SU-2025:20156-1Not reported
Susepython-Jinja2rpmlinux enterprise module for public cloud 15 sp43.1.2-150400.12.14.1Not reportedSUSE-SU-2025:0956-1Not reported
Susepython-Jinja2rpmlinux enterprise module for python 3 15 sp63.1.2-150400.12.14.1Not reportedSUSE-SU-2025:0956-1Not reported
Opensusepython-Jinja2rpmleap 15.63.1.2-150400.12.14.1Not reportedSUSE-SU-2025:0956-1Not reported
Ubuntujinja2debpro2.10-1ubuntu0.18.04.1+esm4Not reportedUBUNTU-CVE-2025-27516Not reported
Ubuntujinja2deb20.042.10.1-2ubuntu0.5Not reportedUBUNTU-CVE-2025-27516Not reported
Ubuntujinja2deb22.043.0.3-1ubuntu0.4Not reportedUBUNTU-CVE-2025-27516Not reported
Ubuntujinja2deb24.043.1.2-1ubuntu1.3Not reportedUBUNTU-CVE-2025-27516Not reported
Susepython-Jinja2rpmlinux enterprise micro 5.32.10.1-150000.3.21.1Not reportedSUSE-SU-2025:1004-1Not reported
Susepython-Jinja2rpmlinux enterprise micro 5.42.10.1-150000.3.21.1Not reportedSUSE-SU-2025:1004-1Not reported
Susepython-Jinja2rpmlinux enterprise micro 5.52.10.1-150000.3.21.1Not reportedSUSE-SU-2025:1004-1Not reported
Susepython-Jinja2rpmlinux enterprise module for basesystem 15 sp62.10.1-150000.3.21.1Not reportedSUSE-SU-2025:1004-1Not reported
Susepython-Jinja2rpmlinux enterprise micro 5.12.10.1-150000.3.21.1Not reportedSUSE-SU-2025:1004-1Not reported
Susepython-Jinja2rpmlinux enterprise micro 5.22.10.1-150000.3.21.1Not reportedSUSE-SU-2025:1004-1Not reported

[Debian bug #1099690]

OpenFactory catalog packages

[Debian 12 (Bookworm)]

  • Source package: [jinja2]

    Details (2)
    • 3.1.2-1+deb12u3 · all · bookworm

      Fixed · Fixed: 3.1.2-1+deb12u3

      usn · jinja2 · debian · bookworm; usn · jinja2 · debian · 12

    • 3.1.2-1+deb12u3 · all · bookworm

      Fixed · Fixed: 3.1.2-1+deb12u3

      usn · jinja2 · debian · bookworm; usn · jinja2 · debian · 12

  • Source package: [jinja2]

    Details (2)
    • 3.1.2-1+deb12u3 · all · bookworm

      Fixed · Fixed: 3.1.2-1+deb12u3

      usn · jinja2 · debian · bookworm; usn · jinja2 · debian · 12

    • 3.1.2-1+deb12u3 · all · bookworm

      Fixed · Fixed: 3.1.2-1+deb12u3

      usn · jinja2 · debian · bookworm; usn · jinja2 · debian · 12

[Debian 13 (Trixie)]

  • Source package: [jinja2]

    Details (2)
    • 3.1.6-1 · all · trixie

      Fixed · Fixed: 3.1.6-1

      usn · jinja2 · debian · 13

    • 3.1.6-1 · all · trixie

      Fixed · Fixed: 3.1.6-1

      usn · jinja2 · debian · 13

  • Source package: [jinja2]

    Details (2)
    • 3.1.6-1 · all · trixie

      Fixed · Fixed: 3.1.6-1

      usn · jinja2 · debian · 13

    • 3.1.6-1 · all · trixie

      Fixed · Fixed: 3.1.6-1

      usn · jinja2 · debian · 13

Observed:

References