CVE-2017-7481CWE-20

Ansible before versions 2.3.1.0 and 2.4.0.0 fails to properly mark lookup-plugin results as unsafe

Medium · published July 19, 2018

CVSS v3.0
5.3
EPSS
5%
Percentile
91.8
In the wild
Unconfirmed
What it is

⚠️ A crafty Unicode string could turn your automation into chaos! Ansible versions before 2.3.1.0 and 2.4.0.0 leave lookup-plugin results improperly marked, opening a door for code injection. 🔥 Think of it like a delivery service that doesn't check the contents of packages—an attacker could sneak in dangerous items without raising any red flags, and before you know it, chaos ensues in your system! If an attacker can control the results of your lookup() calls, they could inject harmful code into the jinja2 templating system. This would allow them to execute arbitrary code, potentially leading to unauthorized access or manipulation of your automation tasks—and nobody wants that!

Put simply

Think of it like a delivery service that doesn't check the contents of packages—an attacker could sneak in dangerous items without raising any red flags, and before you know it, chaos ensues in your system! This vulnerability arises because Ansible fails to properly mark the results of lookup-plugin calls as unsafe, allowing attackers to inject malicious Unicode strings that the jinja2 templating engine will parse and execute.

What to do

If an attacker can control the results of your lookup() calls, they could inject harmful code into the jinja2 templating system. This would allow them to execute arbitrary code, potentially leading to unauthorized access or manipulation of your automation tasks—and nobody wants that! Upgrade Ansible to version 2.3.1.0 or 2.4.0.0 to close this vulnerability. Review your existing lookup calls to ensure they're properly secured against unintended inputs. Don't forget to implement robust input validation wherever possible! You've got this! By following these steps, you're well on your way to becoming a security hero! 🛡️

The record
Technical detail
CVSS v3.0
5.3 · MEDIUM
Vector
CVSS:3.0/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:N
CVSS v4.0
Not supplied
EPSS
0.04782 · 91.8th percentile
Weakness
CWE-20 · Improper Input Validation
Published
2018-07-19T13:00Z
EPSS history
Timeline
  • 19 JUL 13:00Z
    Ansible before versions 2.3.1.0 and 2.4.0.0 fails to properly mark lookup-plugin results as unsafe
    cvelistv5