Skip to content

Ansible fails to properly mark lookup-plugin results as unsafe

Critical severity GitHub Reviewed Published Sep 6, 2018 to the GitHub Advisory Database • Updated Aug 23, 2023

Package

pip ansible (pip)

Affected versions

< 2.3.1.0

Patched versions

2.3.1.0

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.

References

Published to the GitHub Advisory Database Sep 6, 2018
Reviewed Jun 16, 2020
Last updated Aug 23, 2023

Severity

Critical
9.8
/ 10

CVSS base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Weaknesses

CVE ID

CVE-2017-7481

GHSA ID

GHSA-w578-j992-554x

Source code

Checking history
See something to contribute? Suggest improvements for this vulnerability.