CVE-2017-7481
CRITICAL 9.8CVSS 3.1Ansible fails to properly mark lookup-plugin results as unsafe
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
- 19 Jul 2018
- Last modified
- 17 Jun 2026
- Assigned by
- secalert@redhat.com
- NVD status
- Modified
- Weakness
- CWE-20
- Also known as
- GHSA-w578-j992-554xPYSEC-2018-41
- Sources
- NVDJSONOSV GHSA-w578-j992-554xJSONOSV PYSEC-2018-41JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| OSV | GitHub | CVSS 4.0 | 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 | |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | CRITICAL 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| OSV | GitHub | CVSS 3.1 | CRITICAL 9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVD | secalert@redhat.com (Secondary) | CVSS 3.0 | MEDIUM 5.3 | CVSS:3.0/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:N |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | HIGH 7.5 | AV:N/AC:L/Au:N/C:P/I:P/A:P |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | redhat | openshift_container_platformcpe:2.3:a:redhat:openshift_container_platform:3.3:*:*:*:*:*:*:* |
= 3.3 | |
| NVD | redhat | openshift_container_platformcpe:2.3:a:redhat:openshift_container_platform:3.4:*:*:*:*:*:*:* |
= 3.4 | |
| NVD | redhat | openshift_container_platformcpe:2.3:a:redhat:openshift_container_platform:3.5:*:*:*:*:*:*:* |
= 3.5 | |
| NVD | redhat | openstackcpe:2.3:a:redhat:openstack:10:*:*:*:*:*:*:* |
= 10 | |
| NVD | redhat | openstackcpe:2.3:a:redhat:openstack:11:*:*:*:*:*:*:* |
= 11 | |
| NVD | redhat | storage_consolecpe:2.3:a:redhat:storage_console:2.0:*:*:*:*:*:*:* |
= 2.0 | |
| NVD | redhat | virtualizationcpe:2.3:a:redhat:virtualization:4.1:*:*:*:*:*:*:* |
= 4.1 | |
| NVD | redhat | virtualization_managercpe:2.3:a:redhat:virtualization_manager:4.1:*:*:*:*:*:*:* |
= 4.1 | |
| NVD | redhat | gluster_storagecpe:2.3:a:redhat:gluster_storage:3.2:*:*:*:*:*:*:* |
= 3.2 | |
| NVD | redhat | ansible_enginecpe:2.3:a:redhat:ansible_engine:*:*:*:*:*:*:*:* |
< 2.3.1.0 | 2.3.1.0 |
| NVD | redhat | ansible_enginecpe:2.3:a:redhat:ansible_engine:*:*:*:*:*:*:*:* |
>= 2.3.2.0, < 2.4.0.0 | 2.4.0.0 |
| NVD | canonical | ubuntu_linuxcpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:* |
= 16.04 | |
| NVD | canonical | ubuntu_linuxcpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:* |
= 18.04 | |
| NVD | canonical | ubuntu_linuxcpe:2.3:o:canonical:ubuntu_linux:19.04:*:*:*:*:*:*:* |
= 19.04 | |
| NVD | debian | debian_linuxcpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:* |
= 9.0 | |
| OSV | PyPI | ansible | >= 2.3.0.0, < 2.3.1.0 | 2.3.1.0 |
| OSV | PyPI | ansible | < 2.1.6.0 | 2.1.6.0 |
| OSV | PyPI | ansible | >= 2.2.0.0, < 2.2.3.0 | 2.2.3.0 |
| OSV | PyPI | ansible | < 2.3.1.0; >= 2.3.2.0, < 2.4.0.0 | 2.3.1.0, 2.4.0.0 |
References
- http://www.securityfocus.com/bid/98492 · Third Party Advisory, VDB Entry, WEB
- https://access.redhat.com/errata/RHSA-2017:1244 · Vendor Advisory, WEB, ADVISORY
- https://access.redhat.com/errata/RHSA-2017:1334 · Vendor Advisory, WEB, ADVISORY
- https://access.redhat.com/errata/RHSA-2017:1476 · Vendor Advisory, WEB, ADVISORY
- https://access.redhat.com/errata/RHSA-2017:1499 · Vendor Advisory, WEB, ADVISORY
- https://access.redhat.com/errata/RHSA-2017:1599 · Vendor Advisory, WEB, ADVISORY
- https://access.redhat.com/errata/RHSA-2017:2524 · Vendor Advisory, WEB, ADVISORY
- https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2017-7481 · Issue Tracking, Patch, Vendor Advisory, WEB, REPORT
- https://github.com/ansible/ansible/commit/ed56f51f185a1ffd7ea57130d260098686fcc7c2 · Patch, Third Party Advisory, WEB, FIX
- https://lists.debian.org/debian-lts-announce/2021/01/msg00023.html · Mailing List, Third Party Advisory, WEB
- https://usn.ubuntu.com/4072-1/ · Third Party Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2017-7481 · ADVISORY
- https://github.com/ansible/ansible/commit/fd30f5328986f9e1da434474481f32bf918a600c · WEB
- https://github.com/ansible/ansible/commit/f0e348f5eeb70c1fb3127d90891da43b5c0a9d29 · WEB
- https://github.com/ansible/ansible/commit/a1886911fcf4b691130cfc70dfc5daa5e07c46a3 · WEB
- https://web.archive.org/web/20170801122609/http://www.securityfocus.com/bid/98492 · WEB
- https://github.com/pypa/advisory-database/tree/main/vulns/ansible/PYSEC-2018-41.yaml · WEB
- https://github.com/ansible/ansible · PACKAGE
- https://github.com/advisories/GHSA-w578-j992-554x · ADVISORY
History
- 25 Nov 2026 20:21 UTC · NVD: first stored (published 19 Jul 2018)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 19 Jul 2018)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 6 Sep 2018)