p PatchFirst

CVE-2025-27516

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

Здесь приведены факты из открытых источников об уязвимостях. Перед обновлением ознакомьтесь с исходным сообщением.

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 5.4 · Средний · EPSS 0,5% · Есть исправление

Опубликовано
Обновлено

Стек: system · python

Затронутые продукты и версии

  • jinja

    Версии
    • < 3.1.6: Затронуто

    Нет опубликованного исправления

  • jinja2 Debian:12

    Версии
    • 3.1.2-1
    • 3.1.2-1+deb12u1
    • 3.1.2-1+deb12u2
    Затронутые диапазоны версий
    • ECOSYSTEM: < 3.1.2-1+deb12u3

    Обновитесь до 3.1.2-1+deb12u3

  • jinja2 Debian:13

    Затронутые диапазоны версий
    • ECOSYSTEM: < 3.1.6-1

    Обновитесь до 3.1.6-1

  • jinja2 Debian:14

    Затронутые диапазоны версий
    • ECOSYSTEM: < 3.1.6-1

    Обновитесь до 3.1.6-1

  • jinja2 PyPI

    Версии
    • 2.0
    • 2.0rc1
    • 2.1
    • 2.1.1
    • 2.10
    • 2.10.1
    • 2.10.2
    • 2.10.3
    • 2.11.0
    • 2.11.1
    • 2.11.2
    • 2.11.3
    • 2.2
    • 2.2.1
    • 2.3
    • 2.3.1
    • 2.4
    • 2.4.1
    • 2.5
    • 2.5.1
    • 2.5.2
    • 2.5.3
    • 2.5.4
    • 2.5.5
    • 2.6
    • 2.7
    • 2.7.1
    • 2.7.2
    • 2.7.3
    • 2.8
    • 2.8.1
    • 2.9
    • 2.9.1
    • 2.9.2
    • 2.9.3
    • 2.9.4
    • 2.9.5
    • 2.9.6
    • 3.0.0
    • 3.0.0a1
    • 3.0.0rc1
    • 3.0.0rc2
    • 3.0.1
    • 3.0.2
    • 3.0.3
    • 3.1.0
    • 3.1.1
    • 3.1.2
    • 3.1.3
    • 3.1.4
    • 3.1.5
    Затронутые диапазоны версий
    • ECOSYSTEM: < 3.1.6

    Обновитесь до 3.1.6

  • jinja2 Ubuntu:Pro:14.04:LTS

    Версии
    • 2.7-3
    • 2.7.1-1
    • 2.7.2-1
    • 2.7.2-2
    • 2.7.2-2ubuntu0.1~esm1
    • 2.7.2-2ubuntu0.1~esm2
    • 2.7.2-2ubuntu0.1~esm3
    • 2.7.2-2ubuntu0.1~esm4
    Затронутые диапазоны версий
    • ECOSYSTEM: < 2.7.2-2ubuntu0.1~esm6

    Обновитесь до 2.7.2-2ubuntu0.1~esm6

  • jinja2 Ubuntu:Pro:16.04:LTS

    Версии
    • 2.8-1
    • 2.8-1ubuntu0.1
    • 2.8-1ubuntu0.1+esm1
    • 2.8-1ubuntu0.1+esm2
    • 2.8-1ubuntu0.1+esm3
    Затронутые диапазоны версий
    • ECOSYSTEM: < 2.8-1ubuntu0.1+esm5

    Обновитесь до 2.8-1ubuntu0.1+esm5

  • jinja2 Ubuntu:Pro:18.04:LTS

    Версии
    • 2.9.6-1
    • 2.10-1
    • 2.10-1ubuntu0.18.04.1
    • 2.10-1ubuntu0.18.04.1+esm1
    • 2.10-1ubuntu0.18.04.1+esm2
    • 2.10-1ubuntu0.18.04.1+esm3
    Затронутые диапазоны версий
    • ECOSYSTEM: < 2.10-1ubuntu0.18.04.1+esm4

    Обновитесь до 2.10-1ubuntu0.18.04.1+esm4

  • jinja2 Ubuntu:20.04:LTS

    Версии
    • 2.10-2ubuntu1
    • 2.10-2ubuntu2
    • 2.10.1-1ubuntu1
    • 2.10.1-2
    • 2.10.1-2ubuntu0.2
    • 2.10.1-2ubuntu0.3
    • 2.10.1-2ubuntu0.4
    Затронутые диапазоны версий
    • ECOSYSTEM: < 2.10.1-2ubuntu0.5

    Обновитесь до 2.10.1-2ubuntu0.5

  • jinja2 Ubuntu:22.04:LTS

    Версии
    • 2.11.3-1
    • 3.0.1-2
    • 3.0.3-1
    • 3.0.3-1ubuntu0.1
    • 3.0.3-1ubuntu0.2
    • 3.0.3-1ubuntu0.3
    Затронутые диапазоны версий
    • ECOSYSTEM: < 3.0.3-1ubuntu0.4

    Обновитесь до 3.0.3-1ubuntu0.4

  • jinja2 Ubuntu:24.04:LTS

    Версии
    • 3.1.2-1
    • 3.1.2-1ubuntu1
    • 3.1.2-1ubuntu1.1
    • 3.1.2-1ubuntu1.2
    Затронутые диапазоны версий
    • ECOSYSTEM: < 3.1.2-1ubuntu1.3

    Обновитесь до 3.1.2-1ubuntu1.3

Первоисточники

Проверьте свой сервер →