ADVISORIES

Vulnerability

CVE-2025-27516

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.

75 advisories report this vulnerability, across 15 ecosystems.

Advisories

  • ALAS2-2025-2792

    Amazon Linux 2 2017.12 - ALAS2-2025-2792: important priority package update for python-jinja2

    Important CVE-2025-27516 Amazon Linux Updated 25 March 2025
  • ALAS2-2025-2793

    Amazon Linux 2 2017.12 - ALAS2-2025-2793: important priority package update for python3-jinja2

    Important CVE-2025-27516 Amazon Linux Updated 25 March 2025
  • ALAS2023-2025-893

    Amazon Linux 2023 - ALAS2023-2025-893: Important priority package update for ansible-core

    Important CVE-2025-27516 Amazon Linux Updated 26 March 2025
  • ALAS2023-2025-894

    Amazon Linux 2023 - ALAS2023-2025-894: Important priority package update for python-jinja2

    Important CVE-2025-27516 Amazon Linux Updated 26 March 2025
  • ALPINE-CVE-2025-27516

    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…

    CVE-2025-27516 Alpine Updated 27 August 2026
  • ALPINE-EDGE-CVE-2025-27516
    CVE-2025-27516 Alpine Updated 18 November 2026
  • ALSA-2025:3388

    Important: python-jinja2 security update

    CVE-2025-27516 AlmaLinux Updated 29 October 2026
  • ALSA-2025:3406

    Important: python-jinja2 security update

    CVE-2025-27516 AlmaLinux Updated 29 October 2026
  • ALSA-2025:7476

    Important: python-jinja2 security update

    CVE-2025-27516 AlmaLinux Updated 29 October 2026
  • AZL-57800

    CVE-2025-27516 affecting package python-jinja2 for versions less than 3.0.3-7

    CVE-2025-27516 Azure Linux Updated 21 April 2026
  • AZL-57878

    CVE-2025-27516 affecting package python-jinja2 for versions less than 3.1.2-3

    CVE-2025-27516 Azure Linux Updated 24 November 2026
  • AZL-58063

    CVE-2025-27516 affecting package nodejs18 for versions less than 18.20.3-5

    CVE-2025-27516 Azure Linux Updated 21 April 2026
  • AZL-58067

    CVE-2025-27516 affecting package nodejs for versions less than 20.14.0-7

    CVE-2025-27516 Azure Linux Updated 24 November 2026
  • AZL-75804

    CVE-2025-27516 affecting package nodejs24 for versions less than 24.13.0-1

    CVE-2025-27516 Azure Linux Updated 2 June 2026
  • CGA-3pc7-pfwj-crpv
    CVE-2025-27516 ChainguardWolfi Updated 5 November 2026
  • CGA-3rmm-cjjw-m8xv
    CVE-2025-27516 ChainguardWolfi Updated 5 November 2026
  • CGA-3xpx-c9pp-cqf2
    CVE-2025-27516 ChainguardWolfi Updated 5 November 2026
  • CGA-42xf-hgm6-w46m
    CVE-2025-27516 ChainguardWolfi Updated 5 November 2026
  • CGA-4gm9-jrmv-4hxp
    CVE-2025-27516 Chainguard Updated 5 November 2026
  • CGA-73mx-2p2x-g6jq
    CVE-2025-27516 ChainguardWolfi Updated 5 November 2026
  • CGA-932m-9pv9-hp33
    CVE-2025-27516 ChainguardWolfi Updated 5 November 2026
  • CGA-9xg9-38c3-4rx5
    CVE-2025-27516 Chainguard Updated 5 November 2026
  • CGA-f3rx-5w9w-v7pw
    CVE-2025-27516 ChainguardWolfi Updated 5 November 2026
  • CGA-fxpp-5vv6-r37x
    CVE-2025-27516 Chainguard Updated 5 November 2026
  • CGA-g2cq-hqj3-gqc4
    CVE-2025-27516 ChainguardWolfi Updated 5 November 2026
  • CGA-grcq-mqx9-f476
    CVE-2025-27516 Chainguard Updated 5 November 2026
  • CGA-hghm-phh8-7jmp
    CVE-2025-27516 ChainguardWolfi Updated 5 November 2026
  • CGA-hv7v-v9hg-j8g5
    CVE-2025-27516 Chainguard Updated 11 September 2026
  • CGA-j5r4-8x66-fphw
    CVE-2025-27516 Chainguard Updated 5 November 2026
  • CGA-jw7f-qcqc-p9hh
    CVE-2025-27516 Chainguard Updated 5 November 2026
  • CGA-jxxh-cfr2-8hw5
    CVE-2025-27516 ChainguardWolfi Updated 17 September 2026
  • CGA-x22v-q4g7-w4h7
    CVE-2025-27516 Chainguard Updated 5 November 2026
  • DEBIAN-CVE-2025-27516

    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…

    CVE-2025-27516 Debian Updated 1 September 2026
  • DLA-4126-1

    jinja2 - security update

    CVE-2024-56326CVE-2025-27516 Debian Updated 20 November 2026
  • ELSA-2025-3113

    ELSA-2025-3113: fence-agents security update (IMPORTANT)

    Important CVE-2025-27516 Oracle Linux Updated 25 March 2025
  • ELSA-2025-3388

    ELSA-2025-3388: python-jinja2 security update (IMPORTANT)

    Important CVE-2025-27516 Oracle Linux Updated 31 March 2025
  • ELSA-2025-3406

    ELSA-2025-3406: python-jinja2 security update (IMPORTANT)

    Important CVE-2025-27516 Oracle Linux Updated 31 March 2025
  • ELSA-2025-7476

    ELSA-2025-7476: python-jinja2 security update (IMPORTANT)

    Important CVE-2025-27516 Oracle Linux Updated 27 June 2025
  • GHSA-cpwx-vrp4-4pq7

    Jinja2 vulnerable to sandbox breakout through attr filter selecting format method

    Moderate CVE-2025-27516 PyPI Updated 18 November 2026
  • OESA-2025-1529

    python-jinja2 security update

    High CVE-2025-27516 openEuler Updated 18 August 2026
  • OESA-2025-1530

    python-jinja2 security update

    High CVE-2025-27516 openEuler Updated 18 August 2026
  • OESA-2025-1531

    python-jinja2 security update

    High CVE-2025-27516 openEuler Updated 18 August 2026
  • OESA-2025-1532

    python-jinja2 security update

    High CVE-2025-27516 openEuler Updated 18 August 2026
  • PYSEC-2026-1471

    Jinja2 vulnerable to sandbox breakout through attr filter selecting format method

    CVE-2025-27516 PyPI Updated 7 July 2026
  • RHSA-2025:2688

    Red Hat Security Advisory: fence-agents security update

    CVE-2025-27516 Red Hat Updated 13 November 2026
  • RHSA-2025:3017

    Red Hat Security Advisory: fence-agents security update

    CVE-2025-27516 Red Hat Updated 13 November 2026
  • RHSA-2025:3111

    Red Hat Security Advisory: fence-agents security update

    CVE-2025-27516 Red Hat Updated 13 November 2026
  • RHSA-2025:3113

    Red Hat Security Advisory: fence-agents security update

    CVE-2025-27516 Red Hat Updated 13 November 2026
  • RHSA-2025:3123

    Red Hat Security Advisory: Red Hat Ansible Automation Platform 2.4 Product Security and Bug Fix Update

    CVE-2025-27516 Red Hat Updated 13 November 2026
  • RHSA-2025:3160

    Red Hat Security Advisory: Red Hat Ansible Automation Platform 2.5 Product Security and Bug Fix Update

    CVE-2025-26699CVE-2025-27516 Red Hat Updated 13 November 2026
  • RHSA-2025:3371

    Red Hat Security Advisory: Red Hat OpenStack Platform 17.1 (openstack-ansible-core) security update

    CVE-2025-27516 Red Hat Updated 13 November 2026
  • RHSA-2025:3388

    Red Hat Security Advisory: python-jinja2 security update

    CVE-2025-27516 Red Hat Updated 13 November 2026
  • RHSA-2025:3406

    Red Hat Security Advisory: python-jinja2 security update

    CVE-2025-27516 Red Hat Updated 13 November 2026
  • RHSA-2025:3562

    Red Hat Security Advisory: python-jinja2 security update

    CVE-2025-27516 Red Hat Updated 13 November 2026
  • RHSA-2025:3580

    Red Hat Security Advisory: python-jinja2 security update

    CVE-2025-27516 Red Hat Updated 13 November 2026
  • RHSA-2025:3585

    Red Hat Security Advisory: python-jinja2 security update

    CVE-2025-27516 Red Hat Updated 13 November 2026
  • RHSA-2025:3586

    Red Hat Security Advisory: python-jinja2 security update

    CVE-2025-27516 Red Hat Updated 13 November 2026
  • RHSA-2025:3588

    Red Hat Security Advisory: python-jinja2 security update

    CVE-2025-27516 Red Hat Updated 13 November 2026
  • RHSA-2025:3622

    Red Hat Security Advisory: python-jinja2 security update

    CVE-2025-27516 Red Hat Updated 13 November 2026
  • RHSA-2025:3671

    Red Hat Security Advisory: python-jinja2 security update

    CVE-2025-27516 Red Hat Updated 13 November 2026
  • RHSA-2025:7476

    Red Hat Security Advisory: python-jinja2 security update

    CVE-2025-27516 Red Hat Updated 13 November 2026
  • RHSA-2026:43940

    Red Hat Security Advisory: Red Hat Hardened Images RPMs bug fix and enhancement update

    CVE-2025-27516 Red Hat Updated 13 November 2026
  • RHVEX-CVE-2025-27516

    jinja2: Jinja sandbox breakout through attr filter selecting format method

    Important CVE-2025-27516 Red Hat Updated 4 November 2026
  • RLSA-2025:3113

    Important: fence-agents security update

    CVE-2025-27516 Rocky Linux Updated 29 July 2025
  • RLSA-2025:3388

    Important: python-jinja2 security update

    CVE-2025-27516 Rocky Linux Updated 29 July 2025
  • RLSA-2025:3406

    Important: python-jinja2 security update

    CVE-2025-27516 Rocky Linux Updated 7 October 2025
  • RLSA-2025:7476

    Important: python-jinja2 security update

    CVE-2025-27516 Rocky Linux Updated 8 October 2025
  • SUSE-SU-2025:0956-1

    Security update for python-Jinja2

    CVE-2025-27516 SUSEopenSUSE Updated 4 February 2026
  • SUSE-SU-2025:1004-1

    Security update for python-Jinja2

    CVE-2025-27516 SUSE Updated 4 February 2026
  • SUSE-SU-2025:1004-2

    Security update for python-Jinja2

    CVE-2025-27516 SUSE Updated 23 March 2026
  • SUSE-SU-2025:20156-1

    Security update for python-Jinja2

    CVE-2025-27516 SUSE Updated 23 March 2026
  • SUSE-SU-2025:20254-1

    Security update for python-Jinja2

    CVE-2024-56201CVE-2024-56326CVE-2025-27516 SUSE Updated 23 March 2026
  • SUSEVEX-CVE-2025-27516

    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…

    Moderate CVE-2025-27516 SUSEopenSUSE Updated 15 October 2026
  • UBUNTU-CVE-2025-27516

    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…

    CVE-2025-27516 Ubuntu Updated 4 February 2026
  • USN-7343-1

    jinja2 vulnerabilities

    CVE-2024-56201CVE-2024-56326CVE-2025-27516 Ubuntu Updated 25 June 2026

References