Advisory

USN-7343-1

Also known as: CVE-2024-56201, CVE-2024-56326, CVE-2025-27516

Summary

jinja2 vulnerabilities

Details

Rafal Krupinski discovered that Jinja2 did not properly restrict
the execution of code in situations where templates are used maliciously.
An attacker with control over a template's filename and content could
potentially use this issue to enable the execution of arbitrary code.
This issue only affected Ubuntu 14.04 LTS and Ubuntu 16.04 LTS.
(CVE-2024-56201)

It was discovered that Jinja2 sandboxed environments could be escaped
through a call to a string format method. An attacker could possibly use
this issue to enable the execution of arbitrary code. This issue only
affected Ubuntu 14.04 LTS and Ubuntu 16.04 LTS. (CVE-2024-56326)

It was discovered that Jinja2 sandboxed environments could be escaped
through the malicious use of certain filters. An attacker could possibly
use this issue to enable the execution of arbitrary code. (CVE-2025-27516)

Severity

Not rated by the source.

Dates

Published
2025-03-11 17:25 UTC
Modified
2026-06-25 13:31 UTC

Affected packages and fixes

jinja2

Debian packages (deb) · Ubuntu 20.04

Affected

  • introduced 0, fixed 2.10.1-2ubuntu0.5 (ecosystem)

Fixed versions

2.10.1-2ubuntu0.5

Fix

  • Fixed version 2.10.1-2ubuntu0.5
    sudo apt-get update && sudo apt-get upgrade

This command upgrades the distribution's packages. Compare the fixed version with the version you have installed.

jinja2

Debian packages (deb) · Ubuntu 22.04

Affected

  • introduced 0, fixed 3.0.3-1ubuntu0.4 (ecosystem)

Fixed versions

3.0.3-1ubuntu0.4

Fix

  • Fixed version 3.0.3-1ubuntu0.4
    sudo apt-get update && sudo apt-get upgrade

This command upgrades the distribution's packages. Compare the fixed version with the version you have installed.

jinja2

Debian packages (deb) · Ubuntu 24.04

Affected

  • introduced 0, fixed 3.1.2-1ubuntu1.3 (ecosystem)

Fixed versions

3.1.2-1ubuntu1.3

Fix

  • Fixed version 3.1.2-1ubuntu1.3
    sudo apt-get update && sudo apt-get upgrade

This command upgrades the distribution's packages. Compare the fixed version with the version you have installed.

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: Ubuntu Security Notices · CC BY-SA 4.0

Sources & licences