CVE-2019-10906: High severity palletsprojects Jinja vulnerability

Published Apr 6, 2019
·
Updated

In Pallets Jinja before 2.10.1, str.formatmap allows a sandbox escape.

The sandbox is used to restrict what code can be evaluated when rendering untrusted, user-provided templates. Due to the way string formatting works in Python, the str.formatmap method could be used to escape the sandbox.

This issue was previously addressed for the str.format method in Jinja 2.8.1, which discusses the issue in detail. However, the less-common str.formatmap method was overlooked. This release applies the same sandboxing to both methods.

If you cannot upgrade Jinja, you can override the issafeattribute method on the sandbox and explicitly disallow the formatmap method on string objects.

Other sources

In Pallets Jinja before 2.10.1, str.formatmap allows a sandbox escape ...

Debian

Affected Software

16 affected componentsFixes available
redhat/jinja<2.10.1
2.10.1
pip/Jinja2<2.10.1
2.10.1
palletsprojects Jinja<2.10.1
Fedoraproject Fedora=28
Fedoraproject Fedora=29
Fedoraproject Fedora=30
Canonical Ubuntu Linux=12.04
Canonical Ubuntu Linux=14.04
Canonical Ubuntu Linux=16.04
Canonical Ubuntu Linux=18.04
Canonical Ubuntu Linux=18.10
Canonical Ubuntu Linux=19.04
redhat Software Collections=1.0
openSUSE Leap=15.0
openSUSE Leap=42.3
debian/jinja2
2.11.3-12.11.3-1+deb11u43.1.2-1+deb12u33.1.6-13.1.6-3

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade redhat/jinja to a version that resolves this vulnerability.

    Fixed in 2.10.1
  2. Upgrade

    Upgrade pip/Jinja2 to a version that resolves this vulnerability.

    Fixed in 2.10.1
  3. Upgrade

    Upgrade debian/jinja2 to a version that resolves this vulnerability.

    Fixed in 2.11.3-1Fixed in 2.11.3-1+deb11u4Fixed in 3.1.2-1+deb12u3Fixed in 3.1.6-1Fixed in 3.1.6-3
  4. Upgrade

    Upgrade pallets/jinja to a version that resolves this vulnerability.

    Fixed in 2.10.1
  5. Configuration

    If you cannot upgrade, override the sandbox is_safe_attribute method and explicitly disallow the str.format_map method on string objects to prevent sandbox escape.

    Jinja sandbox (is_safe_attribute override) disallow str.format_map on string objects = explicitly disallow
  6. Compensating control

    If you cannot upgrade, use the sandbox override (is_safe_attribute) to restrict rendering of untrusted, user-provided templates so that str.format_map cannot be used for sandbox escape.

Event History

Apr 6, 2019
CVE Published
via MITRE·11:17 PM
Data Sourced
via MITRE·11:17 PM
Description
Apr 7, 2019
Data Sourced
via NVD·12:29 AM
DescriptionSeverityAffected Software
Apr 10, 2019
Advisory Published
via GitHub·02:30 PM
Aug 6, 2025
Data Sourced
via Launchpad·03:43 AM
Description
Aug 30, 2025
Data Sourced
via Ubuntu·03:47 AM
RemedyDescriptionSeverityAffected Software
Jul 16, 2026
Data Sourced
via Debian·11:09 AM
DescriptionAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is CVE-2019-10906?

CVE-2019-10906 is a vulnerability in Pallets Jinja before version 2.10.1 that allows a sandbox escape.

2

How severe is CVE-2019-10906?

CVE-2019-10906 has a severity rating of 8.6, which is considered high.

3

What is the affected software for CVE-2019-10906?

The affected software for CVE-2019-10906 includes Pallets Jinja versions before 2.10.1, Jinja2 packages with versions less than 2.10.1 on Ubuntu, and Jinja packages with versions less than 2.10.1 on Redhat.

4

How can I fix CVE-2019-10906?

To fix CVE-2019-10906, make sure to upgrade to Pallets Jinja version 2.10.1 or later, Jinja2 package version 2.10.1 or later on Ubuntu, or Jinja package version 2.10.1 or later on Redhat.

5

Where can I find more information on CVE-2019-10906?

You can find more information on CVE-2019-10906 at the following references: [link1], [link2], [link3].

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203