CVE-2013-4260: Ansible - Arbitrary File Overwrite via Symlink Attack
Summary
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 ↓
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.
No signup required · Results in about 60 seconds
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 →
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.
References
Related vulnerabilities
Recent vulnerabilities recorded for ansible.