CVE-2025-27516: Jinja sandbox breakout through attr filter selecting format method
Noroxi assessment
Priority: Monitor (action score 21/100)
- The sources we track (CISA KEV, Exploit-DB, Metasploit, Nuclei, GitHub) show no public exploit code or exploitation in the wild.
- Probability of exploitation in the next 30 days: 0.50% (FIRST EPSS).
- Someone with local access to the system can trigger it. A low-privileged account is enough. No special conditions are required; it is repeatable.
- Fixed version: pallets jinja 3.1.6; azl3 nodejs 20.14.0-7 on Azure Linux 3.0 20.14.0-7; azl3 nodejs 20.14.0-8 on Azure Linux 3.0 20.14.0-7.
Low priority for now. Upgrade to pallets jinja 3.1.6; azl3 nodejs 20.14.0-7 on Azure Linux 3.0 20.14.0-7; azl3 nodejs 20.14.0-8 on Azure Linux 3.0 20.14.0-7 or later.
Generated automatically from the record's data: CVSS (NVD and CNA), CISA KEV and SSVC, FIRST EPSS, exploit sources, fixed versions. How we calculate it
Primary sources: NVD · CVE.org · FIRST EPSS
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.
- BDU:2025-06562
- GHSA-cpwx-vrp4-4pq7
- ALSA-2025:3388
- ALSA-2025:3406
- ALSA-2025:7476
- DLA-4126-1
- PYSEC-2026-1471
- RHSA-2025:2688
- RHSA-2025:3017
- RHSA-2025:3111
- RHSA-2025:3113
- RHSA-2025:3123
- RHSA-2025:3160
- RHSA-2025:3371
- RHSA-2025:3388
- RHSA-2025:3406
- RHSA-2025:3562
- RHSA-2025:3580
- RHSA-2025:3585
- RHSA-2025:3586
- Published
- Mar 5, 2025
- Updated
- Jun 17, 2026
- EPSS
- 0.5% · 43th percentile
- CWE
- CWE-1336
Report tools
Action score
21
Low priority for now.
- CVSS
- 21 / 40 · 5.4 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 0 / 30 · 0.5%
CISA SSVC decision
- Exploitation
- none
- Automatable
- no
- Technical impact
- total
Vulnrichment: CISA's decision-tree inputs.
CNA vs NVD score
- NVD
- —
- CNA · GitHub_M
- 5.4
- NVD has not scored this yet; the score shown is the CNA’s.
CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
The score given by the assigning authority versus NVD’s independent score. A gap means the severity is contested.
Get told when this record changes
- Not in KEV: no record of exploitation in the wild
- No public exploit code on record
- A fix has been released
If any of these changes, we'll tell you in the daily email digest.
Is your version affected? Check itNoroxi analysis
What does it mean in your environment?
The assessment above is generated automatically from the record's data; it doesn't know your environment. Our team verifies on your systems whether this vulnerability is actually exploitable and which mitigation is enough.
We use this product, ask for helpAffected systems
Is your version affected?
Pick the product and type the version you run. It's compared with this record's version ranges in your browser; the version isn't sent anywhere.
| Vendor | Product | CPE |
|---|---|---|
| palletsprojects | jinja | cpe:2.3:a:palletsprojects:jinja |
| debian | debian linux | cpe:2.3:o:debian:debian_linux |
Versions reported by the vendor
Affected version ranges reported by the assigning authority (GitHub_M). Independent of NVD's CPE analysis and usually ahead of it.
pallets jinja
- < 3.1.6affected
Affected versions
NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.
- debian debian linux11.0
- palletsprojects jinjabefore 3.1.6
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| AlmaLinux:10 | python3-jinja2 | before 3.1.6-1.el10_0 | 3.1.6-1.el10_0 |
| AlmaLinux:10 | python3-jinja2+i18n | before 3.1.6-1.el10_0 | 3.1.6-1.el10_0 |
| AlmaLinux:8 | python3-jinja2 | before 2.10.1-7.el8_10 | 2.10.1-7.el8_10 |
| AlmaLinux:9 | python3-jinja2 | before 2.11.3-8.el9_5 | 2.11.3-8.el9_5 |
| Alpine:v3.18 | py3-jinja2 | before 3.1.6-r0 | 3.1.6-r0 |
| Debian:11 | jinja2 | before 2.11.3-1+deb11u3 | 2.11.3-1+deb11u3 |
| Debian:12 | jinja2 | before 3.1.2-1+deb12u3 | 3.1.2-1+deb12u3 |
| Debian:13 | jinja2 | before 3.1.6-1 | 3.1.6-1 |
| openSUSE:Leap 15.6 | python-Jinja2 | before 3.1.2-150400.12.14.1 | 3.1.2-150400.12.14.1 |
| PyPI | jinja2 | before 3.1.6 | 3.1.6 |
| Red Hat:ansible_automation_platform_developer:2.4::el8 | python39-jinja2 | before 0:3.1.6-1.el8ap | 0:3.1.6-1.el8ap |
| Red Hat:ansible_automation_platform_developer:2.4::el8 | python3x-jinja2 | before 0:3.1.6-1.el8ap | 0:3.1.6-1.el8ap |
| Red Hat:ansible_automation_platform_developer:2.4::el9 | python-jinja2 | before 0:3.1.6-1.el9ap | 0:3.1.6-1.el9ap |
| Red Hat:ansible_automation_platform_developer:2.4::el9 | python3-jinja2 | before 0:3.1.6-1.el9ap | 0:3.1.6-1.el9ap |
| Red Hat:ansible_automation_platform_developer:2.5::el8 | python3.11-django | before 0:4.2.20-1.el8ap | 0:4.2.20-1.el8ap |
| Red Hat:ansible_automation_platform_developer:2.5::el8 | python3.11-jinja2 | before 0:3.1.6-1.el8ap | 0:3.1.6-1.el8ap |
| Red Hat:ansible_automation_platform_developer:2.5::el9 | python3.11-django | before 0:4.2.20-1.el9ap | 0:4.2.20-1.el9ap |
| Red Hat:ansible_automation_platform_developer:2.5::el9 | python3.11-jinja2 | before 0:3.1.6-1.el9ap | 0:3.1.6-1.el9ap |
| Red Hat:ansible_automation_platform:2.4::el8 | automation-controller-venv-tower | before 0:4.5.20-1.el8ap | 0:4.5.20-1.el8ap |
| Red Hat:ansible_automation_platform:2.4::el9 | automation-controller-venv-tower | before 0:4.5.20-1.el9ap | 0:4.5.20-1.el9ap |
| Red Hat:ansible_automation_platform:2.5::el8 | automation-controller-venv-tower | before 0:4.6.10-1.el8ap | 0:4.6.10-1.el8ap |
| Red Hat:ansible_automation_platform:2.5::el9 | automation-controller-venv-tower | before 0:4.6.10-1.el9ap | 0:4.6.10-1.el9ap |
| Red Hat:enterprise_linux:10.0 | python-jinja2 | before 0:3.1.6-1.el10_0 | 0:3.1.6-1.el10_0 |
| Red Hat:enterprise_linux:10.0 | python3-jinja2 | before 0:3.1.6-1.el10_0 | 0:3.1.6-1.el10_0 |
+96
Same product
palletsprojects: all recordsOther highest-scoring records for the same primary product.
- CVE-2016-10745In Pallets Jinja before 2.8.1, str.format allows a sandbox escape.35Monitor
- CVE-2019-10906In Pallets Jinja before 2.10.1, str.format_map allows a sandbox escape.35Monitor
- CVE-2024-22195Jinja vulnerable to Cross-Site Scripting (XSS)24Monitor
Published before and after this one in the same product
- ← EarlierCVE-2024-34064May 6, 2024 · Jinja vulnerable to HTML attribute injection when passing user input as keys to xmlattr filter21Monitor
- ← EarlierCVE-2024-56201Dec 23, 2024 · Jinja has a sandbox breakout through malicious filenames21Monitor
- ← EarlierCVE-2024-56326Dec 23, 2024 · Jinja has a sandbox breakout through indirect reference to format method21Monitor
Remediation
Which version to upgrade to
Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.
| Product / package | Fixed version | Source |
|---|---|---|
| pallets jinja | 3.1.6 · description | Vendor (CNA) |
| azl3 nodejs 20.14.0-7 on Azure Linux 3.0 | 20.14.0-7 · CBL-Mariner Releases | Microsoft (MSRC) |
| azl3 nodejs 20.14.0-8 on Azure Linux 3.0 | 20.14.0-7 · CBL-Mariner Releases | Microsoft (MSRC) |
| azl3 python-jinja2 3.1.2-3 on Azure Linux 3.0 | 3.1.2-3 · CBL-Mariner Releases | Microsoft (MSRC) |
| cbl2 nodejs18 18.20.3-5 on CBL Mariner 2.0 | 18.20.3-5 · CBL-Mariner Releases | Microsoft (MSRC) |
| cbl2 nodejs18 18.20.3-6 on CBL Mariner 2.0 | 18.20.3-5 · CBL-Mariner Releases | Microsoft (MSRC) |
| cbl2 nodejs18 18.20.3-6 on CBL-Mariner 2.0 | 18.20.3-5 · CBL-Mariner Releases | Microsoft (MSRC) |
| cbl2 python-jinja2 3.0.3-6 on CBL Mariner 2.0 | 3.0.3-6 · CBL-Mariner Releases | Microsoft (MSRC) |
| cbl2 python-jinja2 3.0.3-7 on CBL Mariner 2.0 | 3.0.3-6 · CBL-Mariner Releases | Microsoft (MSRC) |
| cbl2 python-jinja2 3.0.3-7 on CBL-Mariner 2.0 | 3.0.3-6 · CBL-Mariner Releases | Microsoft (MSRC) |
| almalinux:python3-jinja2 | 2.10.1-7.el8_10 · AlmaLinux:8 | Package registry (OSV) |
| almalinux:python3-jinja2+i18n | 3.1.6-1.el10_0 · AlmaLinux:10 | Package registry (OSV) |
| alpine:py3-jinja2 | 3.1.6-r0 · Alpine:v3.18 | Package registry (OSV) |
| debian:jinja2 | 3.1.2-1+deb12u3 · Debian:12 | Package registry (OSV) |
| opensuse:python-Jinja2 | 3.1.2-150400.12.14.1 · openSUSE:Leap 15.6 | Package registry (OSV) |
| PyPI:jinja2 | 3.1.6 | Package registry (OSV) |
| red hat:fence-agents | 0:4.10.0-62.el9_4.11 · Red Hat:rhel_eus:9.4::appstream | Package registry (OSV) |
| red hat:fence-agents-common | 0:4.10.0-62.el9_4.11 · Red Hat:rhel_eus:9.4::appstream | Package registry (OSV) |
| red hat:fence-agents-compute | 0:4.10.0-62.el9_4.11 · Red Hat:rhel_eus:9.4::appstream | Package registry (OSV) |
| red hat:fence-agents-debuginfo | 0:4.10.0-62.el9_4.11 · Red Hat:rhel_eus:9.4::appstream | Package registry (OSV) |
| red hat:fence-agents-debugsource | 0:4.10.0-62.el9_4.11 · Red Hat:rhel_eus:9.4::appstream | Package registry (OSV) |
| red hat:fence-agents-ibm-powervs | 0:4.10.0-62.el9_4.11 · Red Hat:rhel_eus:9.4::appstream | Package registry (OSV) |
| red hat:fence-agents-ibm-vpc | 0:4.10.0-62.el9_4.11 · Red Hat:rhel_eus:9.4::appstream | Package registry (OSV) |
| red hat:fence-agents-kdump-debuginfo | 0:4.10.0-62.el9_4.11 · Red Hat:rhel_eus:9.4::appstream | Package registry (OSV) |
| red hat:fence-agents-kubevirt | 0:4.10.0-62.el9_4.11 · Red Hat:rhel_eus:9.4::appstream | Package registry (OSV) |
| red hat:fence-agents-kubevirt-debuginfo | 0:4.10.0-62.el9_4.11 · Red Hat:rhel_eus:9.4::appstream | Package registry (OSV) |
| red hat:fence-agents-virsh | 0:4.10.0-62.el9_4.11 · Red Hat:rhel_eus:9.4::appstream | Package registry (OSV) |
| red hat:fence-virt | 0:4.10.0-62.el9_4.11 · Red Hat:rhel_eus:9.4::appstream | Package registry (OSV) |
| rocky linux:fence-agents | 0:4.10.0-76.el9_5.6 · Rocky Linux:9 | Package registry (OSV) |
| rocky linux:python-jinja2 | 0:2.10.1-7.el8_10 · Rocky Linux:8 | Package registry (OSV) |
+1
Exploit status
No known public exploit
No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.
Research context
For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.
Timeline
From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.
No dated events beyond publication.
Patch and commit links
Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.
Not on record for this CVE: EPSS history · researcher credit · variant or chain candidate · public bounty program.
Technical details
Attack conditions
- Someone with local access to the system can trigger it.
- A low-privileged account is enough.
- No special conditions are required; it is repeatable.
If successful
- Confidentiality
- Integrity
- Availability
- Attack vector
- Local
- Attack complexity
- Low
- Privileges required
- Low
- User interaction
- P
- Scope
- X
Weakness class (CWE)
CWE-1336 · Improper Neutralization of Special Elements Used in a Template EngineCVSS vector
CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
nvd-secondary
Attack context
MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.
MITRE has no CAPEC/ATT&CK mapping for this CWE.
Change log (1)
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
Show all references (3 more)Show less
Vendor advisories and official records. Exploit/PoC links are deliberately left out.