CVE-2013-4260: Ansible - Arbitrary File Overwrite via Symlink Attack

ansible Updated 02 Oct 2025

Summary

14/05/2022
Yes i
Moderate
6.2

CVE-2013-4260: Ansible Arbitrary File Overwrite Vulnerability. Affects ansible versions >= 1.2, < 1.2.3. Fixed in 1.2.3. How to fix ↓

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 Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Ansible is an open-source automation tool that allows users to automate IT tasks such as configuration management, application deployment, and orchestration. It provides a simple and agentless architecture, making it easy to deploy and manage systems. However, Ansible versions 1.2.x before 1.2.3 are vulnerable to an arbitrary file overwrite vulnerability.

Vulnerability Detail

The vulnerability exists in the 'lib/ansible/playbook/init.py' file of Ansible. When a playbook fails to run due to an error, Ansible creates a retry file with a predictable name in the '/var/tmp/ansible/' directory. This retry file is susceptible to a symlink attack, allowing local users to overwrite arbitrary files on the system. By creating a symbolic link to a sensitive file, an attacker can manipulate the retry file to overwrite the target file with malicious content.

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

1.2.3

This is the first release that contains the fix.

pip install --upgrade "ansible==1.2.3"

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 possible, users can implement a workaround by manually removing the retry file after each playbook run. This can be done by executing the following command:

$ rm /var/tmp/ansible/retry

Conclusion

The vulnerability in Ansible versions 1.2.x before 1.2.3 allows local users to overwrite arbitrary files on the system through a symlink attack on the retry file. To mitigate this vulnerability, it is crucial to upgrade to Ansible 1.2.3 or later. If immediate upgrade is not possible, manually removing the retry file after each playbook run can serve as a temporary workaround. For further support and assistance in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for ansible →

Share this vulnerability

FAQ

This vulnerability allows local users to overwrite arbitrary files on the system, potentially leading to unauthorized access, data loss, or system compromise.

Users of Ansible versions 1.2.0 to 1.2.2 are affected by this vulnerability. It is recommended for all users of these versions to upgrade to Ansible 1.2.3 or later.

There are no known public exploits for this vulnerability at the time of this advisory. However, it is important to apply the necessary patches or upgrades to mitigate the risk.

No, this vulnerability can only be exploited by local users on the system where Ansible is installed.

There is no evidence of active attacks exploiting this vulnerability at the time of this advisory. However, it is still important to apply the recommended fixes to ensure the security of your system.

Related vulnerabilities

Recent vulnerabilities recorded for ansible.

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

1.2.3

This is the first release that contains the fix.

pip install --upgrade "ansible==1.2.3"

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