Skip to content
Fencer Vulns
medium 5.3

CVE-2017-7481 json

Ansible fails to properly mark lookup-plugin results as unsafe

published 2018-07-19 8 y ago modified 2026-06-17 4 mo ago also GHSA-w578-j992-554x , PYSEC-2018-41 , EUVD-2018-0014

cvss
5.3
version 3.0, CNA
cisa kev
Not listed
not in CISA's catalog
epss
4.7%
EPSS 4.7% chance of exploitation in 30 days, percentile 91%
public exploits
0
none known

Summary

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.

Patch / fix

  • pypi ansible 2.1.6.0, 2.2.3.0, 2.3.1.0, 2.4.0.0
  • redhat ansible_engine 2.3.1.0, 2.4.0.0
  • ansible Debian 14, Debian 13, Debian 12 2.3.1.0+dfsg-1

debian advisories DEBIAN-CVE-2017-7481

  • ansible Ubuntu 16.04 LTS 2.0.0.2-2ubuntu1.3

ubuntu advisories UBUNTU-CVE-2017-7481

Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • ansible rhev manager 4 2.3.1.0-3.el7
  • ansible storage 3.2, rhscon 2, openstack 11 +5 more 2.2.3.0-1.el7
  • openshift-ansible openshift 3.2 3.2.56-1.git.0.b844ab7.el7
  • openshift-ansible openshift 3.3 3.3.82-1.git.0.af0c922.el7
  • openshift-ansible openshift 3.4 3.4.89-1.git.0.ac29ce8.el7
  • openshift-ansible openshift 3.5 3.5.71-1.git.0.128c2db.el7
  • atomic-openshift-utils openshift 3.2 3.2.56-1.git.0.b844ab7.el7
  • atomic-openshift-utils openshift 3.3 3.3.82-1.git.0.af0c922.el7

red hat advisories RHSA-2017:2524RHSA-2017:1599RHSA-2017:1476RHSA-2017:1499RHSA-2017:1334RHSA-2017:1244

  • ansible OpenStack Cloud 7 2.2.3.0-5.1
  • monasca-installer OpenStack Cloud 7 20170912_10.45-5.1

suse advisories SUSE-SU-2017:3029-1

  • ansible-14 openSUSE Tumbleweed 14.6.0-1.1
  • ansible-13 openSUSE Tumbleweed 13.7.0-1.1
  • ansible-12 openSUSE Tumbleweed 12.2.0-1.1
  • ansible-11 openSUSE Tumbleweed 11.11.0-1.1
  • ansible-10 openSUSE Tumbleweed 10.6.0-1.1
  • ansible-9 openSUSE Tumbleweed 9.8.0-1.1
  • ansible Package Hub 15 2.7.6-bp150.3.3.1
  • ansible Package Hub 12 2.4.1.0-6.1

opensuse advisories openSUSE-SU-2026:12447-1openSUSE-SU-2026:10944-1openSUSE-SU-2025:15753-1openSUSE-SU-2025:15605-1openSUSE-SU-2024:14536-1openSUSE-SU-2024:14244-1

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2017-7481 updated cvss 5.3

ansible: Security issue with lookup return not tainting the jinja2 environment

  • Red Hat Quickstart Cloud Installer 1 ansible
    affected: no fix available
  • Red Hat Gluster Storage Server 3.2 on RHEL-7 ansible 2.2.3.0-1.el7
    fixed: vendor fix RHSA-2017:1334
  • Red Hat OpenShift Container Platform 3.2 ansible 2.2.3.0-1.el7, openshift-ansible 3.2.56-1.git.0.b844ab7.el7, atomic-openshift-utils 3.2.56-1.git.0.b844ab7.el7, openshift-ansible-roles 3.2.56-1.git.0.b844ab7.el7, openshift-ansible-playbooks 3.2.56-1.git.0.b844ab7.el7, openshift-ansible-filter-plugins 3.2.56-1.git.0.b844ab7.el7, +1 more Red Hat OpenShift Container Platform 3.3 ansible 2.2.3.0-1.el7, openshift-ansible 3.3.82-1.git.0.af0c922.el7, atomic-openshift-utils 3.3.82-1.git.0.af0c922.el7, openshift-ansible-roles 3.3.82-1.git.0.af0c922.el7, openshift-ansible-playbooks 3.3.82-1.git.0.af0c922.el7, openshift-ansible-filter-plugins 3.3.82-1.git.0.af0c922.el7, +2 more Red Hat OpenShift Container Platform 3.4 ansible 2.2.3.0-1.el7, openshift-ansible 3.4.89-1.git.0.ac29ce8.el7, atomic-openshift-utils 3.4.89-1.git.0.ac29ce8.el7, openshift-ansible-roles 3.4.89-1.git.0.ac29ce8.el7, openshift-ansible-playbooks 3.4.89-1.git.0.ac29ce8.el7, openshift-ansible-filter-plugins 3.4.89-1.git.0.ac29ce8.el7, +2 more Red Hat OpenShift Container Platform 3.5 ansible 2.2.3.0-1.el7, openshift-ansible 3.5.71-1.git.0.128c2db.el7, atomic-openshift-utils 3.5.71-1.git.0.128c2db.el7, openshift-ansible-roles 3.5.71-1.git.0.128c2db.el7, openshift-ansible-playbooks 3.5.71-1.git.0.128c2db.el7, openshift-ansible-filter-plugins 3.5.71-1.git.0.128c2db.el7, +2 more
    fixed: vendor fix RHSA-2017:1244
  • Red Hat OpenStack Platform 10.0 ansible 2.2.3.0-1.el7
    fixed: vendor fix RHSA-2017:1599
  • Red Hat OpenStack Platform 11.0 ansible 2.2.3.0-1.el7
    fixed: vendor fix RHSA-2017:1476
  • Red Hat Storage Console Installer 2 ansible 2.2.3.0-1.el7
    fixed: vendor fix RHSA-2017:1499
  • Red Hat Virtualization Manager 4.1 ansible 2.3.1.0-3.el7
    fixed: vendor fix RHSA-2017:2524
  • Red Hat OpenStack Platform 12 (Pike) ansible
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

Exploit prediction

4.74% chance of exploitation in the next 30 days, higher than 91% of all scored CVEs (FIRST EPSS, 2026-11-08).

CVSS scores

assigned by version score vector
CNA 3.0 5.3 CVSS:3.0/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:N
NVD 3.1 9.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
NVD 2.0 7.5 AV:N/AC:L/Au:N/C:P/I:P/A:P
GitHub 3.1 9.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Affected packages

ecosystem package affected fixed in
pypi ansible
>=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
2.3.1.0
2.1.6.0
2.2.3.0
2.4.0.0

Affected products

  • [UNKNOWN] ansible

Classification

Weakness
  • CWE-20 Improper Input Validation

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.