{"schema_version":"1.9.0","id":"GHSA-w578-j992-554x","published":"2018-09-06T03:28:50Z","modified":"2025-05-29T22:55:27.692255Z","aliases":["CVE-2017-7481","PYSEC-2018-41"],"summary":"Ansible fails to properly mark lookup-plugin results as unsafe","details":"Ansible before versions 2.1.6.0, 2.2.3.0, 2.3.1.0, and 2.4.0.0 fails to properly mark lookup-plugin results as unsafe. If an attacker could control the results of lookup() calls, they could inject Unicode strings to be parsed by the jinja2 templating system, resulting in code execution. By default, the jinja2 templating language is now marked as 'unsafe' and is not evaluated.","affected":[{"package":{"name":"ansible","ecosystem":"PyPI","purl":"pkg:pypi/ansible"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.3.0.0"},{"fixed":"2.3.1.0"}]}],"versions":["2.3.0.0"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2018/09/GHSA-w578-j992-554x/GHSA-w578-j992-554x.json"}},{"package":{"name":"ansible","ecosystem":"PyPI","purl":"pkg:pypi/ansible"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.1.6.0"}]}],"versions":["1.0","1.1","1.2","1.2.1","1.2.2","1.2.3","1.3.0","1.3.1","1.3.2","1.3.3","1.3.4","1.4","1.4.1","1.4.2","1.4.3","1.4.4","1.4.5","1.5","1.5.1","1.5.2","1.5.3","1.5.4","1.5.5","1.6","1.6.1","1.6.10","1.6.2","1.6.3","1.6.4","1.6.5","1.6.6","1.6.7","1.6.8","1.6.9","1.7","1.7.1","1.7.2","1.8","1.8.1","1.8.2","1.8.3","1.8.4","1.9.0","1.9.0.1","1.9.1","1.9.2","1.9.3","1.9.4","1.9.5","1.9.6","2.0.0","2.0.0.0","2.0.0.1","2.0.0.2","2.0.1.0","2.0.2.0","2.1.0.0","2.1.1.0","2.1.2.0","2.1.3.0","2.1.4.0","2.1.5.0"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2018/09/GHSA-w578-j992-554x/GHSA-w578-j992-554x.json"}},{"package":{"name":"ansible","ecosystem":"PyPI","purl":"pkg:pypi/ansible"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.2.0.0"},{"fixed":"2.2.3.0"}]}],"versions":["2.2.0.0","2.2.1.0","2.2.2.0"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2018/09/GHSA-w578-j992-554x/GHSA-w578-j992-554x.json"}}],"references":[{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2017-7481"},{"type":"WEB","url":"https://github.com/ansible/ansible/commit/fd30f5328986f9e1da434474481f32bf918a600c"},{"type":"WEB","url":"https://github.com/ansible/ansible/commit/f0e348f5eeb70c1fb3127d90891da43b5c0a9d29"},{"type":"WEB","url":"https://github.com/ansible/ansible/commit/ed56f51f185a1ffd7ea57130d260098686fcc7c2"},{"type":"WEB","url":"https://github.com/ansible/ansible/commit/a1886911fcf4b691130cfc70dfc5daa5e07c46a3"},{"type":"WEB","url":"https://web.archive.org/web/20170801122609/http://www.securityfocus.com/bid/98492"},{"type":"WEB","url":"https://usn.ubuntu.com/4072-1"},{"type":"WEB","url":"https://lists.debian.org/debian-lts-announce/2021/01/msg00023.html"},{"type":"WEB","url":"https://github.com/pypa/advisory-database/tree/main/vulns/ansible/PYSEC-2018-41.yaml"},{"type":"PACKAGE","url":"https://github.com/ansible/ansible"},{"type":"WEB","url":"https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2017-7481"},{"type":"WEB","url":"https://access.redhat.com/errata/RHSA-2017:2524"},{"type":"WEB","url":"https://access.redhat.com/errata/RHSA-2017:1599"},{"type":"WEB","url":"https://access.redhat.com/errata/RHSA-2017:1499"},{"type":"WEB","url":"https://access.redhat.com/errata/RHSA-2017:1476"},{"type":"WEB","url":"https://access.redhat.com/errata/RHSA-2017:1334"},{"type":"WEB","url":"https://access.redhat.com/errata/RHSA-2017:1244"}],"database_specific":{"cwe_ids":["CWE-20"],"github_reviewed":true,"github_reviewed_at":"2020-06-16T21:59:39Z","nvd_published_at":null,"severity":"CRITICAL"},"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_V4","score":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"}]}