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

ansible Updated 02 Oct 2025

Summary

16/09/2013
Yes i
Moderate
6.2

CVE-2013-4260: lib/ansible/playbook/init.py in Ansible 1.2.x before 1.2.3, when playbook does not run due to an error, allows local users to overwrite arbitrary files via a symlink attack on a retry file with a predictable name in /var... Affects ansible versions >= 1.2.0, < 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 MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

Ansible is an open-source automation tool used for configuration management, application deployment, and task automation. It allows users to define and manage infrastructure as code. Ansible playbooks, written in YAML, describe a set of tasks to be executed on remote systems. These playbooks are executed sequentially to achieve the desired state of the infrastructure. Ansible 1.2.x is a specific version of Ansible that was affected by a vulnerability.

Vulnerability Detail

The vulnerability (CVE-2013-4260) in Ansible 1.2.x allows local users to overwrite arbitrary files through a symlink attack on a retry file with a predictable name in /var/tmp/ansible/. When a playbook fails to run due to an error, Ansible creates a retry file in the /var/tmp/ansible/ directory. This retry file has a predictable name, making it susceptible to symlink attacks. By creating a symlink to a target file, an attacker can overwrite arbitrary files on the system, potentially leading to privilege escalation or unauthorized access.

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 of Ansible is not immediately feasible, a possible workaround is to manually modify the Ansible source code to generate retry files with randomized names. This can be achieved by modifying the 'lib/ansible/playbook/init.py' file. Specifically, the code responsible for creating retry files should be updated to use a secure randomization algorithm to generate unique names for each retry file.

Conclusion

The vulnerability in Ansible 1.2.x allows local users to overwrite arbitrary files through a symlink attack. To mitigate this issue, it is recommended to upgrade to Ansible version 1.2.3 or later. Alternatively, a workaround involving manual modification of the Ansible source code can be implemented. For further assistance or support 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 privilege escalation or unauthorized access.

You can check your Ansible version by running the 'ansible --version' command in your terminal. If you are using Ansible 1.2.x, you are affected by this vulnerability.

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

There are no known instances of this vulnerability being exploited in the wild at this time.

No, a CVSS score is not available for this vulnerability.

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