What’s Vulnerable › Vulnerabilities
CVE-2017-7481
- Severity: critical (CVSS 9.8 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 4.8% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2018-07-19 · updated 2026-06-17
- Weakness: CWE-20
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.
Affected products
- Canonical Ubuntu Linux: 16.04, 18.04, 19.04
- Debian Linux: 9.0
- RedHat Ansible Engine: before 2.3.1.0; from 2.3.2.0 before 2.4.0.0 — fixed in 2.3.1.0, 2.4.0.0
- Red Hat, Inc. Gluster Storage for RHEL 6: 3.2
- Red Hat OpenShift Container Platform 4.18: 3.3, 3.4, 3.5
- OpenStack: 10, 11
- RedHat Storage Console: 2.0
- RedHat Virtualization: 4.1
- RedHat Virtualization Manager: 4.1
How to fix
Upgrade to a fixed version: RedHat Ansible Engine 2.3.1.0, 2.4.0.0. Check the vendor advisory for mitigations.
References
- http://www.securityfocus.com/bid/98492
- https://access.redhat.com/errata/RHSA-2017:1244
- https://access.redhat.com/errata/RHSA-2017:1334
- https://access.redhat.com/errata/RHSA-2017:1476
- https://access.redhat.com/errata/RHSA-2017:1499
- https://access.redhat.com/errata/RHSA-2017:1599
- https://access.redhat.com/errata/RHSA-2017:2524
- https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2017-7481
- https://github.com/ansible/ansible/commit/ed56f51f185a1ffd7ea57130d260098686fcc7c2
- https://lists.debian.org/debian-lts-announce/2021/01/msg00023.html
- https://usn.ubuntu.com/4072-1/
- http://www.securityfocus.com/bid/98492
Get alerted when CVE-2017-7481 or the next vulnerability affects your stack