{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2017-7481","id":"CVE-2017-7481","title":"Ansible fails to properly mark lookup-plugin results as unsafe","description":"Ansible before versions 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.","descriptionLong":"Ansible before versions 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.","published":"2018-07-19T13:00:00.000Z","updated":"2026-11-07T17:27:10.434494149Z","reserved":"2017-04-05T00:00:00.000Z","status":"Modified","rejected":false,"assigner":"redhat","metric":{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"NVD"},"metrics":[{"version":"4.0","score":null,"vector":"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","rating":"critical","source":"GitHub"},{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"NVD"},{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"OSV"},{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"GitHub"},{"version":"3.0","score":5.3,"vector":"CVSS:3.0/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:N","rating":"medium","source":"redhat"},{"version":"3.0","score":5.3,"vector":"CVSS:3.0/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:N","rating":"medium","source":"redhat.com"},{"version":"2.0","score":7.5,"vector":"AV:N/AC:L/Au:N/C:P/I:P/A:P","rating":"high","source":"NVD"}],"rating":"critical","products":["[UNKNOWN] ansible"],"affectedProducts":[{"vendor":"[UNKNOWN]","product":"ansible","defaultStatus":null,"versions":[{"status":"affected","version":"ansible 2.3.1.0"},{"status":"affected","version":"ansible 2.4.0.0"}],"platforms":[]}],"packages":[{"ecosystem":"PyPI","name":"ansible","purl":"pkg:pypi/ansible","ranges":[">=2.3.0.0 <2.3.1.0","<2.1.6.0",">=2.2.0.0 <2.2.3.0","<2.3.1.0",">=2.3.2.0 <2.4.0.0"],"fixed":["2.3.1.0","2.1.6.0","2.2.3.0","2.4.0.0"],"advisory":"GHSA-w578-j992-554x"}],"cwes":["CWE-20"],"aliases":["GHSA-w578-j992-554x","PYSEC-2018-41"],"references":[{"url":"https://access.redhat.com/errata/RHSA-2017:1599","tags":["vendor-advisory","x_refsource_REDHAT","x_transferred","Vendor Advisory","advisory","web"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2017-7481","tags":["x_refsource_CONFIRM","x_transferred","Issue Tracking","Patch","Vendor Advisory","fix","web","report"]},{"url":"https://access.redhat.com/errata/RHSA-2017:1334","tags":["vendor-advisory","x_refsource_REDHAT","x_transferred","Vendor Advisory","advisory","web"]},{"url":"http://www.securityfocus.com/bid/98492","tags":["vdb-entry","x_refsource_BID","x_transferred","Third Party Advisory","VDB Entry","advisory","web"]},{"url":"https://github.com/ansible/ansible/commit/ed56f51f185a1ffd7ea57130d260098686fcc7c2","tags":["x_refsource_CONFIRM","x_transferred","Patch","Third Party Advisory","fix","web"]},{"url":"https://access.redhat.com/errata/RHSA-2017:1244","tags":["vendor-advisory","x_refsource_REDHAT","x_transferred","Vendor Advisory","advisory","web"]},{"url":"https://access.redhat.com/errata/RHSA-2017:1499","tags":["vendor-advisory","x_refsource_REDHAT","x_transferred","Vendor Advisory","advisory","web"]},{"url":"https://access.redhat.com/errata/RHSA-2017:2524","tags":["vendor-advisory","x_refsource_REDHAT","x_transferred","Vendor Advisory","advisory","web"]},{"url":"https://access.redhat.com/errata/RHSA-2017:1476","tags":["vendor-advisory","x_refsource_REDHAT","x_transferred","Vendor Advisory","advisory","web"]},{"url":"https://usn.ubuntu.com/4072-1/","tags":["vendor-advisory","x_refsource_UBUNTU","x_transferred","Third Party Advisory","advisory","web"]},{"url":"https://lists.debian.org/debian-lts-announce/2021/01/msg00023.html","tags":["mailing-list","x_refsource_MLIST","x_transferred","Mailing List","Third Party Advisory","advisory","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2017-7481","tags":["advisory"]},{"url":"https://github.com/ansible/ansible/commit/fd30f5328986f9e1da434474481f32bf918a600c","tags":["web"]},{"url":"https://github.com/ansible/ansible/commit/f0e348f5eeb70c1fb3127d90891da43b5c0a9d29","tags":["web"]},{"url":"https://github.com/ansible/ansible/commit/a1886911fcf4b691130cfc70dfc5daa5e07c46a3","tags":["web"]},{"url":"https://web.archive.org/web/20170801122609/http://www.securityfocus.com/bid/98492","tags":["web"]},{"url":"https://usn.ubuntu.com/4072-1","tags":["web"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/ansible/PYSEC-2018-41.yaml","tags":["web"]},{"url":"https://github.com/ansible/ansible","tags":["package"]},{"url":"https://github.com/advisories/GHSA-w578-j992-554x","tags":["advisory"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":null,"epss":0.04743,"epssPercentile":0.92042,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2017-7481","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2017-7481","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2017-7481","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-w578-j992-554x","ok":true,"note":"GHSA-w578-j992-554x"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2017-7481","ok":true,"note":"scored 2026-11-18"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}