CVE-2016-10745: Jinja2 Jinja2 Sandbox Escape Vulnerability Vulnerability
HIGHCVE-2016-10745 is a HIGH (CVSS 8.6) jinja2 sandbox escape vulnerability vulnerability (CWE-134: Use of Externally-Controlled Format String) affecting Jinja2 libraries in the PyPI ecosystem. The issue involves jinja2 sandbox escape vulnerability. Remediation is available by upgrading affected packages to version 2.8.1.
CVE-2016-10745 at a Glance
Security Impact
CVSS: 8.6
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N).
How to Fix CVE-2016-10745
To remediate this vulnerability, upgrade all affected Jinja2 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install Jinja2>=2.8.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show Jinja2
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2016-10745, inspect your installed packages using pip:
pip show Jinja2
Analyze the terminal output to locate any version of Jinja2 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.8.1), your application is affected.
Note: The pip show Jinja2 command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-134: Use of Externally-Controlled Format String, where the product uses a function that accepts a format string as an argument, but the format string originates from an external source. In Jinja2, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2016-10745 Affected Jinja2 Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
Jinja2
|
PyPI |
< 2.8.1
|
2.8.1
|
References
Frequently Asked Questions
What is CVE-2016-10745?
Which Jinja2 versions are affected?
What version fixes CVE-2016-10745?
Is Jinja2 affected?
What is the CVSS score of CVE-2016-10745?
What CWE is associated with CVE-2016-10745?
How can I check PyPI dependencies for CVE-2016-10745?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-hj2j-77xm-mc5v",
"modified" : "2024-09-24T20:51:38Z",
"published" : "2019-04-10T14:30:13Z",
"aliases" : [ "CVE-2016-10745" ],
"summary" : "Jinja2 sandbox escape vulnerability",
"details" : "In Pallets Jinja before 2.8.1, str.format allows a sandbox escape.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:H/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "Jinja2"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.8.1"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2016-10745"
}, {
"type" : "WEB",
"url" : "https://github.com/pallets/jinja/commit/9b53045c34e61013dc8f09b7e52a555fa16bed16"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2019:1022"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2019:1237"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2019:1260"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2019:3964"
}, {
"type" : "WEB",
"url" : "https://access.redhat.com/errata/RHSA-2019:4062"
}, {
"type" : "ADVISORY",
"url" : "https://github.com/advisories/GHSA-hj2j-77xm-mc5v"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/pallets/jinja"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/jinja2/PYSEC-2019-220.yaml"
}, {
"type" : "WEB",
"url" : "https://palletsprojects.com/blog/jinja-281-released"
}, {
"type" : "WEB",
"url" : "https://usn.ubuntu.com/4011-1"
}, {
"type" : "WEB",
"url" : "https://usn.ubuntu.com/4011-2"
}, {
"type" : "WEB",
"url" : "http://lists.opensuse.org/opensuse-security-announce/2019-05/msg00030.html"
}, {
"type" : "WEB",
"url" : "http://lists.opensuse.org/opensuse-security-announce/2019-06/msg00064.html"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-134" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2020-06-16T21:40:24Z",
"nvd_published_at" : null
}
}