All reports
Critical

Ansible fails to properly mark lookup-plugin results as unsafe

Affected versions

Version ranges need review.

Affected versions
>= 2.2.0.0, < 2.2.3.0
Fixed version
2.2.3.0
Affected versions
>= 2.3.0.0, < 2.3.1.0
Fixed version
2.3.1.0
Affected versions
< 2.1.6.0
Fixed version
2.1.6.0
Affected versions
<2.3.1.0 || >=2.3.2.0 <2.4.0.0
Fixed version
2.3.1.0 · 2.4.0.0
Affected versions
Unknown
Fixed version
Not reported

Exploitation

CVE-2017-7481

Probability of exploitation in the next 30 days: 4.74%

FIRST EPSS · 2026-11-20

Description

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.

Links

Credits

  • decsecre583