CVE-2014-4678: Ansible safe_eval Arbitrary Code Execution

ansible Updated 02 Oct 2025

Summary

20/02/2020
Yes i
Critical
9.8

CVE-2014-4678: The safe_eval function in Ansible before 1.6.4 does not properly restrict the code subset, which allows remote attackers to execute arbitrary code via crafted instructions. Affects ansible across 2 version ranges.

< 1.6.4 < 5429b85b9f6c2e640074176f36ff05fd5e4d1916

Fixed in 5429b85b9f6c2e640074176f36ff05fd5e4d1916. How to fix ↓

Also tracked for

The same CVE-2014-4678 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

Ansible is an open-source automation tool that allows users to automate tasks such as configuration management, application deployment, and orchestration. It is widely used in IT infrastructure management and provides a simple and agentless approach to automation. However, Ansible versions before 1.6.4 are vulnerable to an arbitrary code execution vulnerability due to an incomplete fix for CVE-2014-4657. This vulnerability allows remote attackers to execute arbitrary code by exploiting the unsafe code subset allowed by the safe_eval function.

Vulnerability Detail

The safe_eval function in Ansible before 1.6.4 does not properly restrict the code subset, which allows remote attackers to execute arbitrary code via crafted instructions. This vulnerability arises due to an incomplete fix for CVE-2014-4657. By exploiting this vulnerability, an attacker can execute arbitrary code on the target system, potentially leading to unauthorized access, data breaches, or system compromise.

How To Fix

Latest published version: 14.5.0 as of 22 Oct 2026

pip install --upgrade "ansible==14.5.0"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

5429b85b9f6c2e640074176f36ff05fd5e4d1916

This is the first release that contains the fix.

pip install --upgrade "ansible==5429b85b9f6c2e640074176f36ff05fd5e4d1916"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

There is no known workaround for this vulnerability. It is essential to upgrade to the fixed version of Ansible to address the issue.

Conclusion

The CVE-2014-4678 vulnerability in Ansible allows remote attackers to execute arbitrary code on the target system. To mitigate this risk, it is crucial to upgrade to Ansible version 1.6.4 or later. This upgrade will ensure that the safe_eval function properly restricts the code subset, preventing unauthorized code execution. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for ansible →

Share this vulnerability

FAQ

Ansible is an open-source automation tool used for configuration management, application deployment, and orchestration.

CVE-2014-4678 is a vulnerability in Ansible that allows remote attackers to execute arbitrary code via crafted instructions.

This vulnerability can lead to unauthorized code execution on the target system, potentially resulting in data breaches, system compromise, or unauthorized access.

To fix this vulnerability, it is recommended to upgrade to Ansible version 1.6.4 or later.

No, there is no known workaround for this vulnerability. Upgrading to the fixed version is the recommended solution.

Related vulnerabilities

Recent vulnerabilities recorded for ansible.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

Latest published version: 14.5.0 as of 22 Oct 2026

pip install --upgrade "ansible==14.5.0"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

5429b85b9f6c2e640074176f36ff05fd5e4d1916

This is the first release that contains the fix.

pip install --upgrade "ansible==5429b85b9f6c2e640074176f36ff05fd5e4d1916"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback