First published: Sat Apr 06 2019(Updated: )
In Pallets Jinja before 2.10.1, `str.format_map` 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.format_map` 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.format_map` method was overlooked. This release applies the same sandboxing to both methods. If you cannot upgrade Jinja, you can override the `is_safe_attribute` method on the sandbox and explicitly disallow the `format_map` method on string objects.
Credit: cve@mitre.org cve@mitre.org
Affected Software | Affected Version | How to fix |
---|---|---|
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 | |
redhat/jinja | <2.10.1 | 2.10.1 |
debian/jinja2 | 2.11.3-1 3.1.2-1 3.1.3-1 |
Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.
CVE-2019-10906 is a vulnerability in Pallets Jinja before version 2.10.1 that allows a sandbox escape.
CVE-2019-10906 has a severity rating of 8.6, which is considered high.
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.
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.
You can find more information on CVE-2019-10906 at the following references: [link1], [link2], [link3].