Template Injection Affecting jinja2 package, versions [,3.1.5)


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.13% (49th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-PYTHON-JINJA2-8548181
  • published24 Dec 2024
  • disclosed23 Dec 2024
  • creditLydxn

Introduced: 23 Dec 2024

NewCVE-2024-56326  (opens in a new tab)
CWE-1336  (opens in a new tab)

How to fix?

Upgrade jinja2 to version 3.1.5 or higher.

Overview

Affected versions of this package are vulnerable to Template Injection when an attacker controls the content of a template. This is due to an oversight in the sandboxed environment's method detection when using a stored reference to a malicious string's format method, which can then be executed through a filter.

Note: This is only exploitable through custom filters in an application.

CVSS Scores

version 4.0
version 3.1