jinja2 vulnerabilities

A very fast and expressive template engine.

Registry
PyPI
Latest
3.1.6
License
BSD License

10 known advisories

The latest version, 3.1.6, is not affected by any of them. Projects on older versions may be.

Update to the latest version:pip install 'jinja2>=3.1.6'

Is your project on an affected jinja2?

Private repo? Upload its lockfile instead, or connect GitHub to check every repo.

Look after several Python apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie

Security advisories for jinja2

  • MediumCVE-2025-27516GHSA-cpwx-vrp4-4pq75 Mar 2025

    Jinja2 vulnerable to sandbox breakout through attr filter selecting format method

    Affected
    <3.1.6
    Fixed in
    3.1.6
  • MediumCVE-2024-56326GHSA-q2x7-8rv6-6q7h23 Dec 2024

    Jinja has a sandbox breakout through indirect reference to format method

    Affected
    <3.1.5
    Fixed in
    3.1.5
  • MediumCVE-2024-56201GHSA-gmj6-6f8f-669923 Dec 2024

    Jinja has a sandbox breakout through malicious filenames

    Affected
    >=3.0.0 <3.1.5
    Fixed in
    3.1.5
  • MediumCVE-2024-34064GHSA-h75v-3vvj-5mfj6 May 2024

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

    Affected
    <3.1.4
    Fixed in
    3.1.4
  • MediumCVE-2024-22195GHSA-h5c8-rqwp-cp9511 Jan 2024

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

    Affected
    <3.1.3
    Fixed in
    3.1.3
  • MediumCVE-2014-0012GHSA-fqh9-2qgg-h84h17 May 2022

    Insecure Temporary File in Jinja2

    Affected
    <2.7.2
    Fixed in
    2.7.2
  • HighCVE-2014-1402GHSA-8r7q-cvjq-x35314 May 2022

    Incorrect Privilege Assignment in Jinja2

    Affected
    <2.7.2
    Fixed in
    2.7.2
  • MediumCVE-2020-28493GHSA-g3rq-g295-4j3m19 Mar 2021

    Regular Expression Denial of Service (ReDoS) in Jinja2

    Affected
    <2.11.3
    Fixed in
    2.11.3
  • HighCVE-2019-10906GHSA-462w-v97r-4m4510 Apr 2019

    Jinja2 sandbox escape via string formatting

    Affected
    <2.10.1
    Fixed in
    2.10.1
  • HighCVE-2016-10745GHSA-hj2j-77xm-mc5v10 Apr 2019

    Jinja2 sandbox escape vulnerability

    Affected
    <2.8.1
    Fixed in
    2.8.1

Is your jinja2 version vulnerable?

Which of your client projects still run an old jinja2?

NPMscan reads the requirements.txt, poetry.lock, uv.lock and Pipfile.lock in every GitHub repo you pick and checks each installed version against these advisories, including the packages your packages pull in. Each finding comes with the command that fixes it.

Other PyPI packages

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily. Package details from the PyPI registry.