ansible: Security issue with lookup return not tainting the jinja2 environment
Published Jul 19, 2018
9.3
CRITICALCVSS 4.0
EPSS 4.78%
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
- Vendor n/a Product Ansible Defaultn/a
- Version ansible 2.3.1.0StatusaffectedConstraints-
- Version ansible 2.4.0.0StatusaffectedConstraints-
- Version
Default status is the baseline for the product, each version can override it (e.g. patched versions marked unaffected).
| Vendor | Product | Default status | Versions | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| n/a | Ansible | n/a |
|
Configuration 1
- 3.3
- 3.4
- 3.5
- 10
- 11
- 2.0
- 4.1
- 4.1
Configuration 2
- 3.2
Running on/with
- 7.0
Configuration 3
- < 2.3.1.0
- ≥ 2.3.2.0 · < 2.4.0.0
Configuration 4
- 16.04
- 18.04
- 19.04
Configuration 5
- 9.0
No data.
Red Hat Gluster Storage 3.2 for RHEL 7
ansible-0:2.2.3.0-1.el7
Fixed · RHSA-2017:1334
Red Hat OpenShift Container Platform 3.2
ansible-0:2.2.3.0-1.el7
Fixed · RHSA-2017:1244
Red Hat OpenShift Container Platform 3.2
openshift-ansible-0:3.2.56-1.git.0.b844ab7.el7
Fixed · RHSA-2017:1244
Red Hat OpenShift Container Platform 3.3
ansible-0:2.2.3.0-1.el7
Fixed · RHSA-2017:1244
Red Hat OpenShift Container Platform 3.3
openshift-ansible-0:3.3.82-1.git.0.af0c922.el7
Fixed · RHSA-2017:1244
Red Hat OpenShift Container Platform 3.4
ansible-0:2.2.3.0-1.el7
Fixed · RHSA-2017:1244
Red Hat OpenShift Container Platform 3.4
openshift-ansible-0:3.4.89-1.git.0.ac29ce8.el7
Fixed · RHSA-2017:1244
Red Hat OpenShift Container Platform 3.5
ansible-0:2.2.3.0-1.el7
Fixed · RHSA-2017:1244
Red Hat OpenShift Container Platform 3.5
openshift-ansible-0:3.5.71-1.git.0.128c2db.el7
Fixed · RHSA-2017:1244
Red Hat OpenStack Platform 10.0 (Newton)
ansible-0:2.2.3.0-1.el7
Fixed · RHSA-2017:1599
Red Hat OpenStack Platform 11.0 (Ocata)
ansible-0:2.2.3.0-1.el7
Fixed · RHSA-2017:1476
Red Hat Storage Console 2 for Red Hat Enteprise Linux 7
ansible-0:2.2.3.0-1.el7
Fixed · RHSA-2017:1499
Red Hat Virtualization Engine 4.1
ansible-0:2.3.1.0-3.el7
Fixed · RHSA-2017:2524
Red Hat OpenStack Platform 12 (Pike)
ansible
Not affected
Red Hat Quickstart Cloud Installer 1
ansible
Affected
| Product | Package | State | Advisory |
|---|---|---|---|
| Red Hat Gluster Storage 3.2 for RHEL 7 | ansible-0:2.2.3.0-1.el7 | Fixed | RHSA-2017:1334 |
| Red Hat OpenShift Container Platform 3.2 | ansible-0:2.2.3.0-1.el7 | Fixed | RHSA-2017:1244 |
| Red Hat OpenShift Container Platform 3.2 | openshift-ansible-0:3.2.56-1.git.0.b844ab7.el7 | Fixed | RHSA-2017:1244 |
| Red Hat OpenShift Container Platform 3.3 | ansible-0:2.2.3.0-1.el7 | Fixed | RHSA-2017:1244 |
| Red Hat OpenShift Container Platform 3.3 | openshift-ansible-0:3.3.82-1.git.0.af0c922.el7 | Fixed | RHSA-2017:1244 |
| Red Hat OpenShift Container Platform 3.4 | ansible-0:2.2.3.0-1.el7 | Fixed | RHSA-2017:1244 |
| Red Hat OpenShift Container Platform 3.4 | openshift-ansible-0:3.4.89-1.git.0.ac29ce8.el7 | Fixed | RHSA-2017:1244 |
| Red Hat OpenShift Container Platform 3.5 | ansible-0:2.2.3.0-1.el7 | Fixed | RHSA-2017:1244 |
| Red Hat OpenShift Container Platform 3.5 | openshift-ansible-0:3.5.71-1.git.0.128c2db.el7 | Fixed | RHSA-2017:1244 |
| Red Hat OpenStack Platform 10.0 (Newton) | ansible-0:2.2.3.0-1.el7 | Fixed | RHSA-2017:1599 |
| Red Hat OpenStack Platform 11.0 (Ocata) | ansible-0:2.2.3.0-1.el7 | Fixed | RHSA-2017:1476 |
| Red Hat Storage Console 2 for Red Hat Enteprise Linux 7 | ansible-0:2.2.3.0-1.el7 | Fixed | RHSA-2017:1499 |
| Red Hat Virtualization Engine 4.1 | ansible-0:2.3.1.0-3.el7 | Fixed | RHSA-2017:2524 |
| Red Hat OpenStack Platform 12 (Pike) | ansible | Not affected | n/a |
| Red Hat Quickstart Cloud Installer 1 | ansible | Affected | n/a |
No package ranges for this CVE.
Remediation
No remediation recorded yet.
Metrics
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
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS:3.0/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:N
AV:N/AC:L/Au:N/C:P/I:P/A:P
This CVE is not in the KEV list.
No CISA SSVC assessment for this CVE yet.
Estimated probability of exploitation in the wild in the next 30 days (FIRST EPSS). As of Oct 1, 2026.
Score over time
2021–2026- EPSS v1
- EPSS v5
- EPSS v2
- EPSS v3
- EPSS v4
Percentile over time
- EPSS v1
- EPSS v5
- EPSS v2
- EPSS v3
- EPSS v4
Table of values (19 key points)
Flat stretches are collapsed; showing up to 120 newest points.
| Date | Score | Percentile | Model |
|---|---|---|---|
| Oct 1, 2026 | 4.78% (0.04782) | 91.65th | v5 (v2026.06.15) |
| Jun 15, 2026 | 4.62% (0.04617) | 90.47th | v5 (v2026.06.15) |
| Apr 13, 2026 | 3.51% (0.03507) | 87.62th | v4 (v2025.03.14) |
| Dec 7, 2025 | 2.02% (0.02024) | 83.21th | v4 (v2025.03.14) |
| Mar 30, 2025 | 3.87% (0.03866) | 87.15th | v4 (v2025.03.14) |
| Mar 29, 2025 | 7.90% (0.07897) | 86.45th | v4 (v2025.03.14) |
| Mar 17, 2025 | 3.87% (0.03866) | 87.45th | v4 (v2025.03.14) |
| Dec 12, 2024 | 1.95% (0.01951) | 89.17th | v3 (v2023.03.01) |
| Jun 28, 2024 | 1.95% (0.01951) | 88.79th | v3 (v2023.03.01) |
| May 28, 2024 | 1.97% (0.01973) | 88.74th | v3 (v2023.03.01) |
| May 3, 2024 | 1.98% (0.01983) | 88.71th | v3 (v2023.03.01) |
| Jan 19, 2024 | 2.79% (0.02785) | 89.59th | v3 (v2023.03.01) |
| Dec 10, 2023 | 2.49% (0.02494) | 88.92th | v3 (v2023.03.01) |
| Sep 3, 2023 | 1.97% (0.01969) | 87.28th | v3 (v2023.03.01) |
| Mar 7, 2023 | 1.71% (0.01706) | 85.82th | v3 (v2023.03.01) |
| Mar 6, 2023 | 3.81% (0.03806) | 85.56th | v2 (v2022.01.01) |
| Feb 4, 2022 | 3.81% (0.03806) | 67.27th | v2 (v2022.01.01) |
| Feb 3, 2022 | 4.28% (0.04282) | 74.65th | v5 (v2026.06.15) |
| Apr 14, 2021 | 4.28% (0.04282) | 0.00th | v1 |
References (21)
- http://www.securityfocus.com/bid/98492 vdb-entryx_refsource_BIDThird Party AdvisoryVDB Entry
- https://access.redhat.com/errata/RHSA-2017:1244 vendor-advisoryx_refsource_REDHATVendor Advisory
- https://access.redhat.com/errata/RHSA-2017:1334 vendor-advisoryx_refsource_REDHATVendor Advisory
- https://access.redhat.com/errata/RHSA-2017:1476 vendor-advisoryx_refsource_REDHATVendor Advisory
- https://access.redhat.com/errata/RHSA-2017:1499 vendor-advisoryx_refsource_REDHATVendor Advisory
- https://access.redhat.com/errata/RHSA-2017:1599 vendor-advisoryx_refsource_REDHATVendor Advisory
- https://access.redhat.com/errata/RHSA-2017:2524 vendor-advisoryx_refsource_REDHATVendor Advisory
- https://access.redhat.com/security/cve/CVE-2017-7481 Vendor Advisory
- https://bugzilla.redhat.com/show_bug.cgi?id=1450018 Issue Tracking
- https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2017-7481 x_refsource_CONFIRMIssue TrackingPatchVendor Advisory
- https://github.com/advisories/GHSA-w578-j992-554x Advisory
- https://github.com/ansible/ansible/commit/a1886911fcf4b691130cfc70dfc5daa5e07c46a3
- https://github.com/ansible/ansible/commit/ed56f51f185a1ffd7ea57130d260098686fcc7c2 x_refsource_CONFIRMPatchThird Party Advisory
- https://github.com/ansible/ansible/commit/f0e348f5eeb70c1fb3127d90891da43b5c0a9d29
- https://github.com/ansible/ansible/commit/fd30f5328986f9e1da434474481f32bf918a600c
- https://github.com/pypa/advisory-database/tree/main/vulns/ansible/PYSEC-2018-41.yaml
- https://lists.debian.org/debian-lts-announce/2021/01/msg00023.html mailing-listx_refsource_MLISTMailing ListThird Party Advisory
- https://nvd.nist.gov/vuln/detail/CVE-2017-7481
- https://usn.ubuntu.com/4072-1 vendor-advisoryx_refsource_UBUNTUThird Party Advisory
- https://web.archive.org/web/20170801122609/http://www.securityfocus.com/bid/98492
- https://www.cve.org/CVERecord?id=CVE-2017-7481
Change history (0)
No recorded changes yet.