{"id":"UBUNTU-CVE-2019-8341","details":"An issue was discovered in Jinja2 2.10. The from_string function is prone to Server Side Template Injection (SSTI) where it takes the \"source\" parameter as a template object, renders it, and then returns it. The attacker can exploit it with {{INJECTION COMMANDS}} in a URI. NOTE: The maintainer and multiple third parties believe that this vulnerability isn't valid because users shouldn't use untrusted templates without sandboxing","modified":"2025-09-08T16:45:17Z","published":"2019-02-15T07:29:00Z","upstream":["CVE-2019-8341"],"references":[{"type":"REPORT","url":"https://ubuntu.com/security/CVE-2019-8341"},{"type":"REPORT","url":"https://github.com/JameelNabbo/Jinja2-Code-execution"},{"type":"REPORT","url":"https://www.cve.org/CVERecord?id=CVE-2019-8341"}],"affected":[{"package":{"name":"jinja2","ecosystem":"Ubuntu:Pro:14.04:LTS","purl":"pkg:deb/ubuntu/jinja2@2.7.2-2ubuntu0.1~esm6?arch=source&distro=esm-infra-legacy/trusty"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.7-3","2.7.1-1","2.7.2-1","2.7.2-2","2.7.2-2ubuntu0.1~esm1","2.7.2-2ubuntu0.1~esm2","2.7.2-2ubuntu0.1~esm3","2.7.2-2ubuntu0.1~esm4","2.7.2-2ubuntu0.1~esm6"],"ecosystem_specific":{"binaries":[{"binary_name":"python-jinja2","binary_version":"2.7.2-2ubuntu0.1~esm6"},{"binary_name":"python3-jinja2","binary_version":"2.7.2-2ubuntu0.1~esm6"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2019/UBUNTU-CVE-2019-8341.json"}},{"package":{"name":"jinja2","ecosystem":"Ubuntu:Pro:16.04:LTS","purl":"pkg:deb/ubuntu/jinja2@2.8-1ubuntu0.1+esm5?arch=source&distro=esm-infra/xenial"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.8-1","2.8-1ubuntu0.1","2.8-1ubuntu0.1+esm1","2.8-1ubuntu0.1+esm2","2.8-1ubuntu0.1+esm3","2.8-1ubuntu0.1+esm5"],"ecosystem_specific":{"binaries":[{"binary_name":"python-jinja2","binary_version":"2.8-1ubuntu0.1+esm5"},{"binary_name":"python3-jinja2","binary_version":"2.8-1ubuntu0.1+esm5"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2019/UBUNTU-CVE-2019-8341.json"}},{"package":{"name":"jinja2","ecosystem":"Ubuntu:Pro:18.04:LTS","purl":"pkg:deb/ubuntu/jinja2@2.10-1ubuntu0.18.04.1+esm5?arch=source&distro=esm-infra/bionic"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.9.6-1","2.10-1","2.10-1ubuntu0.18.04.1","2.10-1ubuntu0.18.04.1+esm1","2.10-1ubuntu0.18.04.1+esm2","2.10-1ubuntu0.18.04.1+esm3","2.10-1ubuntu0.18.04.1+esm4","2.10-1ubuntu0.18.04.1+esm5"],"ecosystem_specific":{"binaries":[{"binary_name":"python-jinja2","binary_version":"2.10-1ubuntu0.18.04.1+esm5"},{"binary_name":"python3-jinja2","binary_version":"2.10-1ubuntu0.18.04.1+esm5"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2019/UBUNTU-CVE-2019-8341.json"}}],"schema_version":"1.7.3","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"},{"type":"CVSS_V3","score":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"},{"type":"Ubuntu","score":"medium"}]}