CVE-2017-7481: Input Validation

Published May 11, 2017
·
Updated

Ansible before versions 2.1.6.0, 2.2.3.0, 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.

Other sources

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.

Launchpad

Jason McKerr of Red Hat reports:

Data returned in lookup() variables is not marked as unsafe and could result in unicode strings being passed through to the jinja2 templating system.

Red Hat

Affected Software

24 affected componentsFixes available
redhat/ansible<2.3.1.0
2.3.1.0
redhat/ansible<2.4.0.0
2.4.0.0
redhat OpenShift Container Platform=3.3
redhat OpenShift Container Platform=3.4
redhat OpenShift Container Platform=3.5
redhat Openstack=10
redhat Openstack=11
redhat Storage Console=2.0
redhat Virtualization=4.1
redhat Virtualization Manager=4.1
All of the following
redhat Gluster Storage=3.2
redhat Enterprise Linux=7.0
redhat Ansible Engine<2.3.1.0
redhat Ansible Engine>=2.3.2.0<2.4.0.0
Canonical Ubuntu Linux=16.04
Canonical Ubuntu Linux=18.04
Canonical Ubuntu Linux=19.04
Debian Debian Linux=9.0
redhat Gluster Storage=3.2
redhat Enterprise Linux=7.0
pip/ansible>=2.2.0.0<2.2.3.0
2.2.3.0
pip/ansible<2.1.6.0
2.1.6.0
pip/ansible>=2.3.0.0<2.3.1.0
2.3.1.0
debian/ansible
2.10.7+merged+base+2.10.17+dfsg-0+deb11u12.10.7+merged+base+2.10.17+dfsg-0+deb11u47.7.0+dfsg-3+deb12u112.0.0+dfsg-0+deb13u113.4.0+dfsg-1

Event History

Jul 19, 2018
CVE Published
via MITRE·01:00 PM
Data Sourced
via MITRE·01:00 PM
DescriptionSeverityWeakness
Sep 6, 2018
Advisory Published
via GitHub·03:28 AM
Jan 11, 2024
Data Sourced
via Launchpad·10:38 PM
Description
Feb 20, 2026
Data Sourced
via Ubuntu·12:40 AM
RemedyDescriptionSeverityAffected Software
Mar 18, 2026
Data Sourced
via Debian·01:00 AM
DescriptionAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is CVE-2017-7481?

CVE-2017-7481 is a vulnerability in Ansible before versions 2.3.1.0 and 2.4.0.0 that allows an attacker to execute code by injecting Unicode strings in the jinja2 templating system through certain lookup() calls.

2

How severe is CVE-2017-7481?

CVE-2017-7481 has a severity rating of 9.8 (critical).

3

Which versions of Ansible are affected by CVE-2017-7481?

Ansible versions before 2.3.1.0 and 2.4.0.0 are affected by CVE-2017-7481.

4

How can I fix CVE-2017-7481?

To fix CVE-2017-7481, upgrade to Ansible version 2.3.1.0 or 2.4.0.0.

5

Where can I find more information about CVE-2017-7481?

You can find more information about CVE-2017-7481 at the following references: [NIST NVD](https://nvd.nist.gov/vuln/detail/CVE-2017-7481), [GitHub Advisory](https://github.com/advisories/GHSA-w578-j992-554x), [Ansible Commit](https://github.com/ansible/ansible/commit/a1886911fcf4b691130cfc70dfc5daa5e07c46a3).

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203