CVSS 4.0
5.4 mediumCVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:NMedium (5.4). EPSS 0.5% estimated probability of exploitation activity in the next 30 days. Fixed in jinja2 3.1.6.
CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:NCVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:Hjinja2 (PyPI): fixed in 3.1.6Explain CVE-2025-27516 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2025-27516?via=ask-ai-copy and https://cve.bz/cve/CVE-2025-27516?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2025-27516 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.
From the NVD's CPE matches.
| Product | Affected |
|---|---|
| palletsprojects:jinja | before 3.1.6 |
| debian:debian_linux | 11.0 |
| Advisory | Ecosystem | Package | Affected | Fixed in |
|---|---|---|---|---|
| GHSA-cpwx-vrp4-4pq7 | PyPI | jinja2 | <3.1.6 | 3.1.6 |
| PYSEC-2026-1471 | PyPI | jinja2 | <3.1.6 | 3.1.6 |
| Distribution | Release | Package | Fixed in | Advisory |
|---|---|---|---|---|
| Debian | 11 | jinja2 | 2.11.3-1+deb11u3 | DLA-4126-1 |
| Debian | 12 | jinja2 | 3.1.2-1+deb12u3 | DEBIAN-CVE-2025-27516 |
| Debian | 13, 14 | jinja2 | 3.1.6-1 | DEBIAN-CVE-2025-27516 |
| Ubuntu | 20.04:LTS | jinja2 | 2.10.1-2ubuntu0.5 | UBUNTU-CVE-2025-27516 USN-7343-1 |
| Ubuntu | 22.04:LTS | jinja2 | 3.0.3-1ubuntu0.4 | UBUNTU-CVE-2025-27516 USN-7343-1 |
| Ubuntu | 24.04:LTS | jinja2 | 3.1.2-1ubuntu1.3 | UBUNTU-CVE-2025-27516 USN-7343-1 |
| Ubuntu | Pro:14.04:LTS | jinja2 | 2.7.2-2ubuntu0.1~esm6 | UBUNTU-CVE-2025-27516 USN-7343-1 |
| Ubuntu | Pro:16.04:LTS | jinja2 | 2.8-1ubuntu0.1+esm5 | UBUNTU-CVE-2025-27516 USN-7343-1 |
| Ubuntu | Pro:18.04:LTS | jinja2 | 2.10-1ubuntu0.18.04.1+esm4 | UBUNTU-CVE-2025-27516 USN-7343-1 |
| Red Hat | ansible_automation_platform:2.4::el8 | automation-controller-venv-tower | 0:4.5.20-1.el8ap | RHSA-2025:3123 |
| Red Hat | ansible_automation_platform:2.4::el8, ansible_automation_platform_developer:2.4::el8, ansible_automation_platform_inside:2.4::el8 | python39-jinja2, python3x-jinja2 | 0:3.1.6-1.el8ap | RHSA-2025:3123 |
| Red Hat | ansible_automation_platform:2.4::el9 | automation-controller-venv-tower | 0:4.5.20-1.el9ap | RHSA-2025:3123 |
| Red Hat | ansible_automation_platform:2.4::el9, ansible_automation_platform_developer:2.4::el9, ansible_automation_platform_inside:2.4::el9 | python-jinja2, python3-jinja2 | 0:3.1.6-1.el9ap | RHSA-2025:3123 |
| Red Hat | ansible_automation_platform:2.5::el8 | automation-controller-venv-tower | 0:4.6.10-1.el8ap | RHSA-2025:3160 |
| Red Hat | ansible_automation_platform:2.5::el8, ansible_automation_platform_developer:2.5::el8 | python3.11-django | 0:4.2.20-1.el8ap | RHSA-2025:3160 |
| Red Hat | ansible_automation_platform:2.5::el8, ansible_automation_platform_developer:2.5::el8, ansible_automation_platform_inside:2.5::el8 | python3.11-jinja2 | 0:3.1.6-1.el8ap | RHSA-2025:3160 |
| Red Hat | ansible_automation_platform:2.5::el9 | automation-controller-venv-tower | 0:4.6.10-1.el9ap | RHSA-2025:3160 |
| Red Hat | ansible_automation_platform:2.5::el9, ansible_automation_platform_developer:2.5::el9 | python3.11-django | 0:4.2.20-1.el9ap | RHSA-2025:3160 |
| Red Hat | ansible_automation_platform:2.5::el9, ansible_automation_platform_developer:2.5::el9, ansible_automation_platform_inside:2.5::el9 | python3.11-jinja2 | 0:3.1.6-1.el9ap | RHSA-2025:3160 |
| Red Hat | enterprise_linux:8::appstream | python-jinja2, python3-jinja2 | 0:2.10.1-7.el8_10 | RHSA-2025:3388 |
| Red Hat | enterprise_linux:9::appstream | fence-virt, fence-virtd, fence-agents and 23 more | 0:4.10.0-76.el9_5.6 | RHSA-2025:3113 |
| 18 more for Red Hat in the JSON and on Red Hat's page. | ||||
| SUSE | Enterprise Storage 7.1, Linux Enterprise High Performance Computing 15 SP3-LTSS, Linux Enterprise High Performance Computing 15 SP4-ESPOS and 9 more | python-Jinja2 | 2.10.1-150000.3.21.1 | SUSE-SU-2025:1004-2 |
| SUSE | Linux Enterprise Micro 5.1, Linux Enterprise Micro 5.2, Linux Enterprise Micro 5.3 and 3 more | python-Jinja2 | 2.10.1-150000.3.21.1 | SUSE-SU-2025:1004-1 |
| SUSE | Linux Enterprise Module for Public Cloud 15 SP4, Linux Enterprise Module for Python 3 15 SP6 | python-Jinja2 | 3.1.2-150400.12.14.1 | SUSE-SU-2025:0956-1 |
| SUSE | Linux Micro 6.0 | python-Jinja2 | 3.1.2-8.1 | SUSE-SU-2025:20156-1 |
| SUSE | Linux Micro 6.1 | python-Jinja2 | 3.1.4-slfo.1.1_2.1 | SUSE-SU-2025:20254-1 |
| openSUSE | Leap 15.6 | python-Jinja2 | 3.1.2-150400.12.14.1 | SUSE-SU-2025:0956-1 |
| AlmaLinux | 8 | python3-jinja2 | 2.10.1-7.el8_10 | ALSA-2025:3388 |
| AlmaLinux | 9 | python3-jinja2 | 2.11.3-8.el9_5 | ALSA-2025:3406 |
| AlmaLinux | 10 | python3-jinja2, python3-jinja2+i18n | 3.1.6-1.el10_0 | ALSA-2025:7476 |
| Rocky Linux | 8 | python-jinja2 | 0:2.10.1-7.el8_10 | RLSA-2025:3388 |
| Rocky Linux | 9 | fence-agents | 0:4.10.0-76.el9_5.6 | RLSA-2025:3113 |
| Rocky Linux | 9 | python-jinja2 | 0:2.11.3-8.el9_5 | RLSA-2025:3406 |
| Rocky Linux | 10 | python-jinja2 | 0:3.1.6-1.el10_0 | RLSA-2025:7476 |
| Alpine | v3.18, v3.19, v3.20 and 4 more | py3-jinja2 | 3.1.6-r0 | ALPINE-CVE-2025-27516 |
| Azure Linux | 2 | nodejs18 | 18.20.3-5 | AZL-58063 |
| Azure Linux | 2 | python-jinja2 | 3.0.3-7 | AZL-57800 |
| Azure Linux | 3 | nodejs | 20.14.0-7 | AZL-58067 |
| Azure Linux | 3 | nodejs24 | 24.13.0-1 | AZL-75804 |
| Azure Linux | 3 | python-jinja2 | 3.1.2-3 | AZL-57878 |
| Alpaquita | 23, stream | py3-jinja2 | 3.1.6-r0 | BELL-CVE-2025-27516 |
From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; AlmaLinux's OSV database, MIT; Rocky Linux's errata, BSD-3-Clause; the Alpine secdb, CC BY-SA 4.0; Microsoft's Azure Linux vulnerability data, MIT; BellSoft's OSV database, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE · Alpine · Alpaquita.
Red Hat rates this Important.
This vulnerability is rated as important severity due to the potential for an attacker to bypass Jinja's sandbox by exploiting the |attr filter, by controlling template content, an attacker can execute arbitrary Python code, impacting the integrity, confidentiality, and availability of the system. While the attack requires user interaction to trigger untrusted templates, the risk is significant in applications that allow such templates to be executed.
Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability.
| Product | Package | State | Advisory |
|---|---|---|---|
| Ansible Automation Platform Execution Environments | ansible-automation-platform/ee-minimal-rhel8:2.16.14-11 | Fixed 2025-03-11 | RHSA-2025:2664 |
| Ansible Automation Platform Execution Environments | ansible-automation-platform/ee-minimal-rhel9:2.16.14-12 | Fixed 2025-03-11 | RHSA-2025:2664 |
| Red Hat Ansible Automation Platform 2.4 for RHEL 8 | automation-controller-0:4.5.20-1.el8ap | Fixed 2025-03-24 | RHSA-2025:3123 |
| Red Hat Ansible Automation Platform 2.4 for RHEL 8 | python3x-jinja2-0:3.1.6-1.el8ap | Fixed 2025-03-24 | RHSA-2025:3123 |
| Red Hat Ansible Automation Platform 2.4 for RHEL 8 | ansible-automation-platform-24/lightspeed-rhel8:2.4.250225-5 | Fixed 2025-03-24 | RHSA-2025:3124 |
| Red Hat Ansible Automation Platform 2.4 for RHEL 9 | automation-controller-0:4.5.20-1.el9ap | Fixed 2025-03-24 | RHSA-2025:3123 |
| Red Hat Ansible Automation Platform 2.4 for RHEL 9 | python-jinja2-0:3.1.6-1.el9ap | Fixed 2025-03-24 | RHSA-2025:3123 |
| Red Hat Ansible Automation Platform 2.5 for RHEL 8 | automation-controller-0:4.6.10-1.el8ap | Fixed 2025-03-25 | RHSA-2025:3160 |
| Red Hat Ansible Automation Platform 2.5 for RHEL 8 | python3.11-jinja2-0:3.1.6-1.el8ap | Fixed 2025-03-25 | RHSA-2025:3160 |
| Red Hat Ansible Automation Platform 2.5 for RHEL 8 | ansible-automation-platform-25/lightspeed-rhel8:2.5.250318-2 | Fixed 2025-03-25 | RHSA-2025:3162 |
| OpenShift Serverless | openshift-serverless-1/kn-eventing-istio-controller-rhel8 | Will not fix | |
| Red Hat Ansible Automation Platform 2 | ansible-automation-platform-24/ee-dellemc-openmanage-rhel8 | Not affected | |
| Red Hat Ansible Automation Platform 2 | ansible-automation-platform-25/platform-resource-runner-rhel8 | Not affected | |
| Red Hat Ceph Storage 7 | ceph | Not affected | |
| Red Hat Ceph Storage 8 | ceph | Not affected | |
| Red Hat Ceph Storage 9 | ceph | Not affected | |
| Red Hat Discovery 1 | discovery-server-container | Not affected | |
| Red Hat Enterprise Linux 6 | python-jinja2 | Out of support scope | |
| Red Hat Enterprise Linux 7 | python-jinja2 | Not affected | |
| Red Hat Enterprise Linux AI (RHEL AI) | rhelai1/bootc-amd-rhel9 | Affected | |
| 120 more in the JSON and on Red Hat's page. | |||
Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2025-27516.