8.8

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

Modified
AliasesALPINE-CVE-2025-27516MGASA-2025-0094SUSE-SU-2025:0956-1
Published 05-03-2025Last modified 26-02-2026

Vulnerability summary

CVE-2025-27516 is a high (CVSS 8.8) vulnerability in debian debian_linux. EPSS estimates a 0.51% chance of exploitation in the next 30 days, higher than 43.3% of scored vulnerabilities.

Priority
Routine

Not severe (CVSS 5.4, local access); no exploitation reported by the 5 checked sources

Source freshness unavailable

How is this decided?
CVSS score
8.8/10
010
High · v3.1 (NVD)
EPSS score
0.51%
0%100%
Low · 0.00 pp in 30 days
KEVNot listedNot listed by any tracked catalog.
RansomwareNot flaggedNo ransomware use recorded.
Public exploits0No public exploits recorded

Advisory lineage

Upstream 0 · Downstream 4 · Related 19

Timeline

  1. 05-03-2025
    PublishedVulnerability first disclosed.
  2. 26-02-2026
    Last modifiedVulnerability information updated.

Description

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.

CVSS metrics

11 scores · 9 sources · 2 versions

EPSS trend

Probability

0.51%

Chance of exploitation in the next 30 days

Percentile

43%

Versus all other CVEs

30-day change

No change 0.00 pp

From 0.51% on 04-10-2026

04-10-202603-11-2026

Known exploited

Compare KEV catalogs
CISA KEV

Not in the CISA KEV catalog.

ENISA CNW

Not in the ENISA CNW catalog.

CIRCL

Not in the CIRCL catalog.

Public exploits

0 found

No public exploits indexed.

Weaknesses

CWE · root cause

Affected systems

Version check

Known conditions: local access, low-privilege account, user interaction (CVSS vector). Other conditions: not stated in public data.

Redhat77 products
  • automation-controller-venv-tower< 0:4.5.20-1.el8ap | < 0:4.5.20-1.el9ap
  • fence-agents< 0:4.10.0-62.el9_4.11 | < 0:4.10.0-20.el9_0.21 | < 0:4.10.0-43.el9_2.12 | < 0:4.10.0-76.el9_5.6
  • fence-agents-aliyun< 0:4.10.0-62.el9_4.11 | < 0:4.10.0-20.el9_0.21 | < 0:4.10.0-43.el9_2.12 | < 0:4.10.0-76.el9_5.6
  • fence-agents-all< 0:4.10.0-62.el9_4.11 | < 0:4.10.0-20.el9_0.21 | < 0:4.10.0-43.el9_2.12 | < 0:4.10.0-76.el9_5.6
  • fence-agents-amt-ws< 0:4.10.0-62.el9_4.11 | < 0:4.10.0-20.el9_0.21 | < 0:4.10.0-43.el9_2.12 | < 0:4.10.0-76.el9_5.6
Suse21 products
  • python-Jinja2&distro=SUSE Enterprise Storage 7.1< 2.10.1-150000.3.21.1
  • python-Jinja2&distro=SUSE Linux Enterprise High Performance Computing 15 SP3-LTSS< 2.10.1-150000.3.21.1
  • python-Jinja2&distro=SUSE Linux Enterprise High Performance Computing 15 SP4-ESPOS< 2.10.1-150000.3.21.1
  • python-Jinja2&distro=SUSE Linux Enterprise High Performance Computing 15 SP4-LTSS< 2.10.1-150000.3.21.1
  • python-Jinja2&distro=SUSE Linux Enterprise High Performance Computing 15 SP5-ESPOS< 2.10.1-150000.3.21.1
Chainguard11 products
  • checkov< 3.2.432-r0
  • jupyter-base-notebook< 7.3.2-r2
  • jupyter-docker-base< 999.9.9_git20260925-r0
  • jupyter-docker-stacks< 999.9.9_git20260925-r0 | < 7.3.2-r1
  • nemo< 1.23.0-r11
Wolfi5 products
  • checkov< 3.2.432-r0
  • jupyter-base-notebook< 7.3.2-r2
  • jupyter-docker-base< 999.9.9_git20260925-r0
  • jupyter-docker-stacks< 999.9.9_git20260925-r0 | < 7.3.2-r1
  • reflex< 0.7.2-r0
Debian2 products
Alpine1 product
  • py3-jinja2< 3.1.6-r0
Mageia1 product
  • python-jinja2< 3.1.6-1.mga9
Opensuse1 product
  • python-Jinja2&distro=openSUSE Leap 15.6< 3.1.2-150400.12.14.1
Pallets1 product
Palletsprojects1 product
PyPI1 product
  • jinja2< 3.1.6
Ubuntu1 product
  • jinja2< 2.7.2-2ubuntu0.1~esm6 | < 2.8-1ubuntu0.1+esm5 | < 2.10-1ubuntu0.18.04.1+esm4 | < 2.10.1-2ubuntu0.5 | < 3.0.3-1ubuntu0.4 | < 3.1.2-1ubuntu1.3

12 vendors · 123 products

References

62 links
Show all 62 references