Skip to content
Noroxi
NVD / CVE Program· CNA GitHub_M

CVE-2025-27516: Jinja sandbox breakout through attr filter selecting format method

MediumCVSS 5.4 · v4.0—No exploit Fix available

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.

Published
Mar 5, 2025
Updated
Jun 17, 2026
EPSS
0.5% · 43th percentile

Report tools

JSON

Action score

21

Monitor

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.

Follow CVE-2025-27516

When you'll hear from us

  • when it enters CISA KEV
  • when exploit code appears or is weaponized
  • when the record is updated (including a fixed version)
  • when EPSS rises 20 points in a week

One daily email digest (06:00 UTC); connect a webhook for KEV listings and weaponized exploits every 10 minutes on paid plans, on the hour on the free plan.

Your free account also gets you

  • CVE alerts: add the products and versions you run, get the new CVEs that affect them
  • Uptime monitoring: 1 site, instant email when it goes down
  • Add your domain: subdomains and takeover risk scanned every week (1 domain)
  • 10 scans an hour on the security tools, at most 30 a day (3 a day without an account), an API key and MCP
  • All your scans in one panel: findings, what changed in the last scan, a report per domain or per client (PDF, share link)
All free tools
Is your version affected? Check it

Noroxi 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 help

Affected 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.

VendorProduct
palletsprojectsjinja
debiandebian 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.

EcosystemPackageAffected rangeFix
AlmaLinux:10python3-jinja2before 3.1.6-1.el10_03.1.6-1.el10_0
AlmaLinux:10python3-jinja2+i18nbefore 3.1.6-1.el10_03.1.6-1.el10_0
AlmaLinux:8python3-jinja2before 2.10.1-7.el8_102.10.1-7.el8_10
AlmaLinux:9python3-jinja2before 2.11.3-8.el9_52.11.3-8.el9_5
Alpine:v3.18py3-jinja2before 3.1.6-r03.1.6-r0
Debian:11jinja2before 2.11.3-1+deb11u32.11.3-1+deb11u3
Debian:12jinja2before 3.1.2-1+deb12u33.1.2-1+deb12u3
Debian:13jinja2before 3.1.6-13.1.6-1
openSUSE:Leap 15.6python-Jinja2before 3.1.2-150400.12.14.13.1.2-150400.12.14.1
PyPIjinja2before 3.1.63.1.6
Red Hat:ansible_automation_platform_developer:2.4::el8python39-jinja2before 0:3.1.6-1.el8ap0:3.1.6-1.el8ap
Red Hat:ansible_automation_platform_developer:2.4::el8python3x-jinja2before 0:3.1.6-1.el8ap0:3.1.6-1.el8ap
Red Hat:ansible_automation_platform_developer:2.4::el9python-jinja2before 0:3.1.6-1.el9ap0:3.1.6-1.el9ap
Red Hat:ansible_automation_platform_developer:2.4::el9python3-jinja2before 0:3.1.6-1.el9ap0:3.1.6-1.el9ap
Red Hat:ansible_automation_platform_developer:2.5::el8python3.11-djangobefore 0:4.2.20-1.el8ap0:4.2.20-1.el8ap
Red Hat:ansible_automation_platform_developer:2.5::el8python3.11-jinja2before 0:3.1.6-1.el8ap0:3.1.6-1.el8ap
Red Hat:ansible_automation_platform_developer:2.5::el9python3.11-djangobefore 0:4.2.20-1.el9ap0:4.2.20-1.el9ap
Red Hat:ansible_automation_platform_developer:2.5::el9python3.11-jinja2before 0:3.1.6-1.el9ap0:3.1.6-1.el9ap
Red Hat:ansible_automation_platform:2.4::el8automation-controller-venv-towerbefore 0:4.5.20-1.el8ap0:4.5.20-1.el8ap
Red Hat:ansible_automation_platform:2.4::el9automation-controller-venv-towerbefore 0:4.5.20-1.el9ap0:4.5.20-1.el9ap
Red Hat:ansible_automation_platform:2.5::el8automation-controller-venv-towerbefore 0:4.6.10-1.el8ap0:4.6.10-1.el8ap
Red Hat:ansible_automation_platform:2.5::el9automation-controller-venv-towerbefore 0:4.6.10-1.el9ap0:4.6.10-1.el9ap
Red Hat:enterprise_linux:10.0python-jinja2before 0:3.1.6-1.el10_00:3.1.6-1.el10_0
Red Hat:enterprise_linux:10.0python3-jinja2before 0:3.1.6-1.el10_00:3.1.6-1.el10_0

+96

Other 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 filter
    21Monitor
  • ← EarlierCVE-2024-56201Dec 23, 2024 · Jinja has a sandbox breakout through malicious filenames
    21Monitor
  • ← EarlierCVE-2024-56326Dec 23, 2024 · Jinja has a sandbox breakout through indirect reference to format method
    21Monitor

Remediation

Which version to upgrade to

Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.

Product / packageFixed versionSource
pallets jinja3.1.6 · descriptionVendor (CNA)
azl3 nodejs 20.14.0-7 on Azure Linux 3.020.14.0-7 · CBL-Mariner ReleasesMicrosoft (MSRC)
azl3 nodejs 20.14.0-8 on Azure Linux 3.020.14.0-7 · CBL-Mariner ReleasesMicrosoft (MSRC)
azl3 python-jinja2 3.1.2-3 on Azure Linux 3.03.1.2-3 · CBL-Mariner ReleasesMicrosoft (MSRC)
cbl2 nodejs18 18.20.3-5 on CBL Mariner 2.018.20.3-5 · CBL-Mariner ReleasesMicrosoft (MSRC)
cbl2 nodejs18 18.20.3-6 on CBL Mariner 2.018.20.3-5 · CBL-Mariner ReleasesMicrosoft (MSRC)
cbl2 nodejs18 18.20.3-6 on CBL-Mariner 2.018.20.3-5 · CBL-Mariner ReleasesMicrosoft (MSRC)
cbl2 python-jinja2 3.0.3-6 on CBL Mariner 2.03.0.3-6 · CBL-Mariner ReleasesMicrosoft (MSRC)
cbl2 python-jinja2 3.0.3-7 on CBL Mariner 2.03.0.3-6 · CBL-Mariner ReleasesMicrosoft (MSRC)
cbl2 python-jinja2 3.0.3-7 on CBL-Mariner 2.03.0.3-6 · CBL-Mariner ReleasesMicrosoft (MSRC)
almalinux:python3-jinja22.10.1-7.el8_10 · AlmaLinux:8Package registry (OSV)
almalinux:python3-jinja2+i18n3.1.6-1.el10_0 · AlmaLinux:10Package registry (OSV)
alpine:py3-jinja23.1.6-r0 · Alpine:v3.18Package registry (OSV)
debian:jinja23.1.2-1+deb12u3 · Debian:12Package registry (OSV)
opensuse:python-Jinja23.1.2-150400.12.14.1 · openSUSE:Leap 15.6Package registry (OSV)
PyPI:jinja23.1.6Package registry (OSV)
red hat:fence-agents0:4.10.0-62.el9_4.11 · Red Hat:rhel_eus:9.4::appstreamPackage registry (OSV)
red hat:fence-agents-common0:4.10.0-62.el9_4.11 · Red Hat:rhel_eus:9.4::appstreamPackage registry (OSV)
red hat:fence-agents-compute0:4.10.0-62.el9_4.11 · Red Hat:rhel_eus:9.4::appstreamPackage registry (OSV)
red hat:fence-agents-debuginfo0:4.10.0-62.el9_4.11 · Red Hat:rhel_eus:9.4::appstreamPackage registry (OSV)
red hat:fence-agents-debugsource0:4.10.0-62.el9_4.11 · Red Hat:rhel_eus:9.4::appstreamPackage registry (OSV)
red hat:fence-agents-ibm-powervs0:4.10.0-62.el9_4.11 · Red Hat:rhel_eus:9.4::appstreamPackage registry (OSV)
red hat:fence-agents-ibm-vpc0:4.10.0-62.el9_4.11 · Red Hat:rhel_eus:9.4::appstreamPackage registry (OSV)
red hat:fence-agents-kdump-debuginfo0:4.10.0-62.el9_4.11 · Red Hat:rhel_eus:9.4::appstreamPackage registry (OSV)
red hat:fence-agents-kubevirt0:4.10.0-62.el9_4.11 · Red Hat:rhel_eus:9.4::appstreamPackage registry (OSV)
red hat:fence-agents-kubevirt-debuginfo0:4.10.0-62.el9_4.11 · Red Hat:rhel_eus:9.4::appstreamPackage registry (OSV)
red hat:fence-agents-virsh0:4.10.0-62.el9_4.11 · Red Hat:rhel_eus:9.4::appstreamPackage registry (OSV)
red hat:fence-virt0:4.10.0-62.el9_4.11 · Red Hat:rhel_eus:9.4::appstreamPackage registry (OSV)
rocky linux:fence-agents0:4.10.0-76.el9_5.6 · Rocky Linux:9Package registry (OSV)
rocky linux:python-jinja20:2.10.1-7.el8_10 · Rocky Linux:8Package 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

CVSS 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.

References

All records