CVE-2014-4966: Ansible Remote Code Execution

ansible Updated 02 Oct 2025

Summary

18/02/2020
Yes i
Critical
9.8

CVE-2014-4966: Ansible before 1.6.7 does not prevent inventory data with "{{" and "lookup" substrings, and does not prevent remote data with "{{" substrings, which allows remote attackers to execute arbitrary code via (1) crafted looku... Affects ansible across 2 version ranges.

< 1.6.7 < 62a1295a3e08cb6c3e9f1b2a1e6e5dcaeab32527

Fixed in 62a1295a3e08cb6c3e9f1b2a1e6e5dcaeab32527. How to fix ↓

Also tracked for

The same CVE-2014-4966 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

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

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 IT tasks such as configuration management, application deployment, and orchestration. It uses a simple and human-readable language called YAML to define automation tasks. Ansible is widely used in the industry due to its simplicity and scalability. However, versions before 1.6.7 are vulnerable to remote code execution.

Vulnerability Detail

The vulnerability in Ansible versions before 1.6.7 allows remote attackers to execute arbitrary code. This vulnerability arises from the lack of prevention mechanisms for inventory data and remote data containing specific substrings. Attackers can exploit this by crafting malicious lookup('pipe') calls or providing crafted Jinja2 data. By leveraging these vulnerabilities, an attacker can execute arbitrary code on the target system, potentially leading to unauthorized access, data theft, or further compromise of the system.

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

62a1295a3e08cb6c3e9f1b2a1e6e5dcaeab32527

This is the first release that contains the fix.

pip install --upgrade "ansible==62a1295a3e08cb6c3e9f1b2a1e6e5dcaeab32527"

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

Workaround

If upgrading to the latest version is not immediately feasible, users can implement the following workaround to mitigate the risk of remote code execution:

  1. Avoid using inventory data or remote data that contains the substrings "{{", "lookup", or "{{".
  2. Regularly review and sanitize inventory data and remote data to remove any potentially malicious content.

By following these steps, users can reduce the likelihood of exploitation until a proper upgrade can be performed.

Conclusion

The vulnerability in Ansible versions before 1.6.7 allows remote code execution, which can lead to unauthorized access, data theft, or further compromise of the system. It is crucial to upgrade to the latest version of Ansible or apply the provided workaround to mitigate the risk. For more information and assistance, please contact DevNack.com.

See every vulnerability recorded for ansible →

Share this vulnerability

FAQ

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

This vulnerability allows remote attackers to execute arbitrary code on systems running vulnerable versions of Ansible, potentially leading to unauthorized access, data theft, or further compromise of the system.

To fix this vulnerability, it is recommended to upgrade to Ansible version 1.6.7 or later. This version includes the necessary prevention mechanisms to mitigate the remote code execution vulnerability.

If upgrading to the latest version is not immediately feasible, users can avoid using inventory data or remote data that contains specific substrings and regularly review and sanitize their data to remove potentially malicious content.

For more information about this vulnerability, you can refer to the official advisory provided by the Ansible project. Additionally, you can reach out to info@devnack.com for further support on vulnerability remediation.

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

62a1295a3e08cb6c3e9f1b2a1e6e5dcaeab32527

This is the first release that contains the fix.

pip install --upgrade "ansible==62a1295a3e08cb6c3e9f1b2a1e6e5dcaeab32527"

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