cbcvebase.
CVE-2016-9587
published 2018-04-24

CVE-2016-9587: Ansible before versions 2.1.4, 2.2.1 is vulnerable to an improper input validation in Ansible's handling of data sent from client systems. An attacker with…

PriorityP268high8.1CVSS 3.1
AVNACHPRNUINSUCHIHAH
EXPLOIT
EPSS
17.65%
96.8th percentile
Ansible before versions 2.1.4, 2.2.1 is vulnerable to an improper input validation in Ansible's handling of data sent from client systems. An attacker with control over a client system being managed by Ansible and the ability to send facts back to the Ansible server could use this flaw to execute arbitrary code on the Ansible server using the Ansible server privileges.

Affected

10 ranges
VendorProductVersion rangeFixed in
ansibleansible< 2.2.12.2.1
debianansible< ansible 2.2.0.0-3 (bookworm)ansible 2.2.0.0-3 (bookworm)
redhatansible< 2.1.42.1.4
redhatansible>= 0 < 2.2.0.0-32.2.0.0-3
redhatansible>= 0 < 2.2.0.0-32.2.0.0-3
redhatansible>= 0 < 2.2.0.0-32.2.0.0-3
redhatansible>= 0 < 2.2.0.0-32.2.0.0-3
redhatansible>= 0 < 2.1.4.02.1.4.0
redhatansible>= 2.2.0.0 < 2.2.1.02.2.1.0
redhatopenstack

Detection & IOCsextracted from sources · hover to see the quote

command#jinja2:variable_start_string:'[[',variable_end_string:']]',block_start_string:'[%',block_end_string:'%]' {{}} [[ansible_host]][[lookup('pipe', '<PAYLOAD>')]]
command{{ %s }}
command[ '{'*2 + "%s" + '}'*2 ]
  • Monitor for Ansible facts containing Jinja2 template injection strings, especially those using alternative variable delimiters (e.g., '[[ ]]') set via the '#jinja2:' header directive in fact values.
  • Detect Ansible fact values that begin with '{' or '[' as these trigger safe_eval evaluation, which can be abused to reconstruct Jinja2 templates and achieve code execution.
  • Detect managed hosts sending back '_ansible_verbose_override': 0 in facts, which is used to suppress verbosity on the controller and hide exploitation attempts.
  • Watch for add_host responses from managed nodes that set 'ansible_python_interpreter' or other interpreter facts via host_vars, which can redirect execution to an attacker-controlled binary.
  • Detect Ansible fact keys containing Jinja2 template syntax (e.g., '{{ ... }}'), as dictionary keys are not sanitized and can be used for template injection when the dict is coerced to a string.
  • Flag known conditional strings being registered as facts (e.g., "ansible_os_family == 'Debian'"), as these trigger a special-case evaluation path in Ansible's conditional handling that can execute injected content.
  • ·The exploit requires the attacker to already have control over a managed client host and the ability to send crafted facts back to the Ansible controller — it is not a remote unauthenticated attack.
  • ·The fix in versions 2.1.4 and 2.2.1 was incomplete; CVE-2017-7466 tracks the remaining bypass, requiring upgrade to Ansible 2.3 for full remediation.
  • ·Verbosity suppression via '_ansible_verbose_override' fact means exploitation attempts may not appear in controller logs even at default verbosity settings.

CVSS provenance

nvdv3.18.1HIGHCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
nvdv3.06.6MEDIUMCVSS:3.0/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:H
nvdv2.09.3CRITICALAV:N/AC:M/Au:N/C:C/I:C/A:C
osv8.1HIGH
vendor_debian8.1HIGH
vendor_redhat8.1HIGH
CVEs like this are exactly what “Exploited This Week” covers.

Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.