PyPI (Python)Worst: High10 advisories

jinja2: known vulnerabilities

jinja2 has 10 reviewed security advisories in the GitHub Advisory Database — 3 high, 7 moderate. The most recent was published 2025-03-05. Each one below lists the affected version range, the release that fixes it, its CVE and severity. SkyShield matches these against the jinja2 versions running across your servers, containers and images, and ranks what to patch first.

How to fix jinja2

Upgrade jinja2 to a release at or above the fixed version shown for each advisory below. For PyPI (Python):

pip install --upgrade jinja2 (pin jinja2>=3.1.6)

SkyShield checks the installed version on every machine and container, so you can see which hosts are still on an affected release after you roll the fix out.

Advisories (10)

Jinja2 vulnerable to sandbox breakout through attr filter selecting format method Moderate CWE-1336 — Affected: before 3.1.6. Fixed in 3.1.6. Published 2025-03-05. GHSA-cpwx-vrp4-4pq7 · CVE-2025-27516
Jinja has a sandbox breakout through malicious filenames Moderate 8.8 CWE-150 — Affected: from 3.0.0 up to 3.1.5. Fixed in 3.1.5. Published 2024-12-23. GHSA-gmj6-6f8f-6699 · CVE-2024-56201
Jinja has a sandbox breakout through indirect reference to format method Moderate 7.8 CWE-693 — Affected: before 3.1.5. Fixed in 3.1.5. Published 2024-12-23. GHSA-q2x7-8rv6-6q7h · CVE-2024-56326
Jinja vulnerable to HTML attribute injection when passing user input as keys to xmlattr filter Moderate 5.4 CWE-79 — Affected: before 3.1.4. Fixed in 3.1.4. Published 2024-05-06. GHSA-h75v-3vvj-5mfj · CVE-2024-34064
Jinja vulnerable to HTML attribute injection when passing user input as keys to xmlattr filter Moderate 5.4 CWE-79 — Affected: before 3.1.3. Fixed in 3.1.3. Published 2024-01-11. GHSA-h5c8-rqwp-cp95 · CVE-2024-22195
Regular Expression Denial of Service (ReDoS) in Jinja2 Moderate 5.3 CWE-400 — Affected: before 2.11.3. Fixed in 2.11.3. Published 2021-02-01. GHSA-g3rq-g295-4j3m · CVE-2020-28493
Jinja2 sandbox escape via string formatting High 8.6 CWE-693 — Affected: before 2.10.1. Fixed in 2.10.1. Published 2019-04-07. GHSA-462w-v97r-4m45 · CVE-2019-10906
Incorrect Privilege Assignment in Jinja2 High 8.4 CWE-266 — Affected: before 2.7.2. Fixed in 2.7.2. Published 2014-05-19. GHSA-8r7q-cvjq-x353 · CVE-2014-1402

Find jinja2 across your fleet

Install one agent per server and connect your cloud. SkyShield matches your packages and images against GHSA, CISA KEV and EPSS and shows the fix per machine. Free for one server, then from $49 per server a month. Start free.