p PatchFirst

PatchFirst · Latest vulnerabilities

jinja2 vulnerabilities

Vulnerabilities published for jinja2 in the last 30 days: 0. Listed in the KEV catalogue: 0.

Filter vulnerabilities
Clear filters

Vulnerabilities: 10

  1. CVE-2025-27516

    Medium · CVSS 5.4EPSS 0.51%Fix available

    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 pl

    • Update to 3.1.6
    Published Updated
  2. CVE-2024-56326

    Medium · CVSS 5.4EPSS 0.52%Fix available

    Jinja has a sandbox breakout through indirect reference to format method

    Jinja is an extensible templating engine. Prior to 3.1.5, An oversight in how the Jinja sandboxed environment detects calls to str.format 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 store a reference to a malicious string's format method, the

    • Update to 3.1.5
    Published Updated
  3. CVE-2024-56201

    Medium · CVSS 5.4EPSS 0.31%Fix available

    Jinja has a sandbox breakout through malicious filenames

    Jinja is an extensible templating engine. In versions on the 3.x branch prior to 3.1.5, a bug in the Jinja compiler allows an attacker that controls both the content and filename of a template to execute arbitrary Python code, regardless of if Jinja's sandbox is used. To exploit the vulnerability, an attacker needs to control both the filename and the contents 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 where the template author can also choose the template filename. This vulnerability is fixed in 3.1.5.

    • Update to 3.1.5
    Published Updated
  4. CVE-2024-34064

    Medium · CVSS 5.4EPSS 0.98%Fix available

    Jinja vulnerable to HTML attribute injection when passing user input as keys to xmlattr filter

    Jinja is an extensible templating engine. The `xmlattr` filter in affected versions of Jinja accepts keys containing non-attribute characters. XML/HTML attributes cannot contain spaces, `/`, `>`, or `=`, as each would then be interpreted as starting a separate attribute. If an application accepts keys (as opposed to only values) as user input, and renders these in pages that other users see as well, an attacker could use this to inject other attributes and perform XSS. The fix for CVE-2024-22195 only addressed spaces but not other characters. Accepting keys as user input is now explicitly considered an unintended use case of the `xmlattr` fil

    • Update to 3.1.4
    Published Updated
  5. CVE-2024-22195

    Medium · CVSS 5.4EPSS 0.89%Fix available

    Jinja vulnerable to Cross-Site Scripting (XSS)

    Jinja is an extensible templating engine. Special placeholders in the template allow writing code similar to Python syntax. It is possible to inject arbitrary HTML attributes into the rendered HTML template, potentially leading to Cross-Site Scripting (XSS). The Jinja `xmlattr` filter can be abused to inject arbitrary HTML attribute keys and values, bypassing the auto escaping mechanism and potentially leading to XSS. It may also be possible to bypass attribute validation checks if they are blacklist-based.

    • Update to 3.1.3
    Published Updated
  6. CVE-2020-28493

    Medium · CVSS 5.3EPSS 3.59%Fix available

    Regular Expression Denial of Service (ReDoS)

    This affects the package jinja2 from 0.0.0 and before 2.11.3. The ReDoS vulnerability is mainly due to the `_punctuation_re regex` operator and its use of multiple wildcards. The last wildcard is the most exploitable as it searches for trailing punctuation. This issue can be mitigated by Markdown to format user content instead of the urlize filter, or by implementing request timeouts and limiting process memory.

    • Update to 2.11.3
    Published Updated
  7. CVE-2014-1402

    High · CVSS 8.6EPSS 0.38%Fix available

    CVE-2014-1402

    The default configuration for bccache.FileSystemBytecodeCache in Jinja2 before 2.7.2 does not properly create temporary files, which allows local users to gain privileges via a crafted .cache file with a name starting with __jinja2_ in /tmp.

    • Update to 2.7.2
    Published Updated
  8. CVE-2014-0012

    Medium · CVSS 6.9EPSS 0.43%Fix available

    CVE-2014-0012

    FileSystemBytecodeCache in Jinja2 2.7.2 does not properly create temporary directories, which allows local users to gain privileges by pre-creating a temporary directory with a user's uid. NOTE: this vulnerability exists because of an incomplete fix for CVE-2014-1402.

    • Update to 2.7.2
    • Update to 2.7.3
    Published Updated

Check your server

Check your installed stack and versions against the current vulnerability feeds.

Check your server →