Skip to content
OpenAdvisories
Medium · 5.3 CVE-2017-7481 EUVD-2018-0014GHSA-w578-j992-554xPYSEC-2018-41

Ansible fails to properly mark lookup-plugin results as unsafe

Published Jul 19, 2018 · Updated Aug 5, 2024 · Assigned by redhat

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

VendorProductAffectedFixed
[UNKNOWN] ansible ansible 2.3.1.0, ansible 2.4.0.0 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 ansible 2.3.1.0+dfsg-1 —
Debian 13 ansible 2.3.1.0+dfsg-1 —
Debian 12 ansible 2.3.1.0+dfsg-1 —
Debian 9 ansible 2.2.1.0-2+deb9u2 DLA-2535-1
ReleasePackageFixed inAdvisory
Ubuntu 18.04 LTS ansible 2.5.1+dfsg-1ubuntu0.1 USN-4072-1
Ubuntu 16.04 LTS ansible 2.0.0.2-2ubuntu1.3 USN-4072-1
ReleasePackageFixed inAdvisory
Red Hat Rhscon 2 ansible 2.2.3.0-1.el7 RHSA-2017:1499
Red Hat Rhev Manager 4 ansible +1 2.3.1.0-3.el7 RHSA-2017:2524
Red Hat OpenStack 11 ansible 2.2.3.0-1.el7 RHSA-2017:1476
Show 3 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Red Hat OpenStack 10 ansible 2.2.3.0-1.el7 RHSA-2017:1599
Red Hat OpenShift 3 ansible 2.2.3.0-1.el7 RHSA-2017:1244
Red Hat OpenShift 3 openshift-ansible +6 3.2.56-1.git.0.b844ab7.el7 RHSA-2017:1244
Red Hat OpenShift 3 openshift-ansible-callback-plugins 3.3.82-1.git.0.af0c922.el7 RHSA-2017:1244
Red Hat Gluster Storage 3 ansible 2.2.3.0-1.el7 RHSA-2017:1334
ReleasePackageFixed inAdvisory
SUSE Package Hub 15 ansible 2.7.6-bp150.3.3.1 openSUSE-SU-2019:0238-1
SUSE Package Hub 12 ansible 2.4.1.0-6.1 openSUSE-SU-2017:2978-1, openSUSE-SU-2017:2976-1
SUSE OpenStack Cloud 7 ansible 2.2.3.0-5.1 SUSE-SU-2017:3029-1
SUSE OpenStack Cloud 7 monasca-installer 20170912_10.45-5.1 SUSE-SU-2017:3029-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed ansible-10 10.6.0-1.1 openSUSE-SU-2024:14536-1
openSUSE Tumbleweed ansible-11 11.11.0-1.1 openSUSE-SU-2025:15605-1
openSUSE Tumbleweed ansible-12 12.2.0-1.1 openSUSE-SU-2025:15753-1
openSUSE Tumbleweed ansible-13 13.7.0-1.1 openSUSE-SU-2026:10944-1
openSUSE Tumbleweed ansible-14 14.6.0-1.1 openSUSE-SU-2026:12447-1
openSUSE Tumbleweed ansible-9 9.8.0-1.1 openSUSE-SU-2024:14244-1

Affected packages

EcosystemPackageAffectedFixedRecord
PyPI ansible >= 2.3.0.0, < 2.3.1.0 2.3.1.0 GHSA-w578-j992-554x
PyPI ansible < 2.1.6.0 2.1.6.0 GHSA-w578-j992-554x
PyPI ansible >= 2.2.0.0, < 2.2.3.0 2.2.3.0 GHSA-w578-j992-554x
PyPI ansible < 2.3.1.0 · >= 2.3.2.0, < 2.4.0.0 2.3.1.0, 2.4.0.0 PYSEC-2018-41

Advisories 19

References