Skip to content
Heist/ feed
Back to feed
Critical

Security advisory

Type: advisorySources: OSVCVE: CVE-2017-7481

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2017-7481
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 10:19 UTC · Revision 1

Source evidence

CVE-2017-7481

core-osv · Original source

Published 19 Jul 2018, 13:29 UTC

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.

osv:CVE-2017-7481
Complete source record
{
  "id": "67a8218c6d32b7c1f9db0c8e5d50f35c3e10dcf2922cc1bdf27144517358c2a6",
  "url": "https://osv.dev/vulnerability/CVE-2017-7481",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2017-7481",
    "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.",
    "evidence": "osv:CVE-2017-7481",
    "products": [],
    "severity": "critical",
    "structured": {
      "id": "CVE-2017-7481",
      "aliases": [
        "CVE-2017-7481",
        "GHSA-w578-j992-554x",
        "PYSEC-2018-41"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/ansible/ansible",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "ecb38fdf73a0beb89e9505157a2ea20c96f666d7"
                },
                {
                  "introduced": "c7052b42c76bc626c481f22018d3396b84199a24"
                },
                {
                  "fixed": "d14467b0294296b9a2b85e0ad150315c2d5a2491"
                },
                {
                  "fixed": "ed56f51f185a1ffd7ea57130d260098686fcc7c2"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:redhat:ansible_engine:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "2.3.1.0"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:redhat:ansible_engine:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "2.3.2.0"
                      },
                      {
                        "fixed": "2.4.0.0"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "range": [
                      {
                        "fixed": "ed56f51f185a1ffd7ea57130d260098686fcc7c2"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v2.3.1.0-0.2.rc2",
            "v2.3.1.0-0.1.rc1",
            "v2.3.0.0-1",
            "v2.3.0.0-0.6.rc6",
            "v2.3.0.0-0.5.rc5",
            "v2.3.0.0-0.4.rc4",
            "v2.3.0.0-0.3.rc3",
            "v2.3.0.0-0.2.rc2",
            "v2.3.0.0-0.1.rc1",
            "v2.0.0-0.5.beta3",
            "v2.0.0-0.4.beta2",
            "v2.0.0-0.3.beta1",
            "v2.0.0-0.2.alpha2",
            "v2.0.0-0.1.alpha1",
            "v1.6.0",
            "v1.4.0",
            "v1.2",
            "v1.1",
            "v1.0",
            "0.7",
            "0.3",
            "0.0.1",
            "0.01"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2017-7481.json"
          }
        }
      ],
      "modified": "2026-10-20T10:50:09.503871932Z",
      "provider": "osv",
      "references": [
        "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://lists.debian.org/debian-lts-announce/2021/01/msg00023.html",
        "https://usn.ubuntu.com/4072-1/",
        "https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2017-7481",
        "https://github.com/ansible/ansible/commit/ed56f51f185a1ffd7ea57130d260098686fcc7c2"
      ],
      "provider_metadata": {
        "unresolved_ranges": [
          {
            "cpes": [
              "cpe:2.3:o:canonical:ubuntu_linux:16.04:*:*:*:lts:*:*:*",
              "cpe:2.3:o:canonical:ubuntu_linux:18.04:*:*:*:lts:*:*:*",
              "cpe:2.3:o:canonical:ubuntu_linux:19.04:*:*:*:*:*:*:*"
            ],
            "vendor_product": "canonical:ubuntu_linux",
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "16.04"
                  },
                  {
                    "last_affected": "16.04"
                  },
                  {
                    "introduced": "18.04"
                  },
                  {
                    "last_affected": "18.04"
                  },
                  {
                    "introduced": "19.04"
                  },
                  {
                    "last_affected": "19.04"
                  }
                ],
                "source": "CPE_STRING"
              }
            ]
          },
          {
            "cpes": [
              "cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*"
            ],
            "vendor_product": "debian:debian_linux",
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "9.0"
                  },
                  {
                    "last_affected": "9.0"
                  }
                ],
                "source": "CPE_STRING"
              }
            ]
          },
          {
            "cpes": [
              "cpe:2.3:a:redhat:gluster_storage:3.2:*:*:*:*:*:*:*"
            ],
            "vendor_product": "redhat:gluster_storage",
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "3.2"
                  },
                  {
                    "last_affected": "3.2"
                  }
                ],
                "source": "CPE_STRING"
              }
            ]
          },
          {
            "cpes": [
              "cpe:2.3:a:redhat:openshift_container_platform:3.3:*:*:*:*:*:*:*",
              "cpe:2.3:a:redhat:openshift_container_platform:3.4:*:*:*:*:*:*:*",
              "cpe:2.3:a:redhat:openshift_container_platform:3.5:*:*:*:*:*:*:*"
            ],
            "vendor_product": "redhat:openshift_container_platform",
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "3.3"
                  },
                  {
                    "last_affected": "3.3"
                  },
                  {
                    "introduced": "3.4"
                  },
                  {
                    "last_affected": "3.4"
                  },
                  {
                    "introduced": "3.5"
                  },
                  {
                    "last_affected": "3.5"
                  }
                ],
                "source": "CPE_STRING"
              }
            ]
          },
          {
            "cpes": [
              "cpe:2.3:a:redhat:openstack:10:*:*:*:*:*:*:*",
              "cpe:2.3:a:redhat:openstack:11:*:*:*:*:*:*:*"
            ],
            "vendor_product": "redhat:openstack",
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "10"
                  },
                  {
                    "last_affected": "10"
                  },
                  {
                    "introduced": "11"
                  },
                  {
                    "last_affected": "11"
                  }
                ],
                "source": "CPE_STRING"
              }
            ]
          },
          {
            "cpes": [
              "cpe:2.3:a:redhat:storage_console:2.0:*:*:*:*:*:*:*"
            ],
            "vendor_product": "redhat:storage_console",
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "2.0"
                  },
                  {
                    "last_affected": "2.0"
                  }
                ],
                "source": "CPE_STRING"
              }
            ]
          },
          {
            "cpes": [
              "cpe:2.3:a:redhat:virtualization:4.1:*:*:*:*:*:*:*"
            ],
            "vendor_product": "redhat:virtualization",
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "4.1"
                  },
                  {
                    "last_affected": "4.1"
                  }
                ],
                "source": "CPE_STRING"
              }
            ]
          },
          {
            "cpes": [
              "cpe:2.3:a:redhat:virtualization_manager:4.1:*:*:*:*:*:*:*"
            ],
            "vendor_product": "redhat:virtualization_manager",
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "4.1"
                  },
                  {
                    "last_affected": "4.1"
                  }
                ],
                "source": "CPE_STRING"
              }
            ]
          }
        ]
      }
    },
    "related_cves": [
      {
        "value": "CVE-2017-7481",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 381360,
  "published_at": "2018-07-19T13:29:00.34+00:00"
}