CVE-2013-4259: Symlink Attack in Ansible
Summary
CVE-2013-4259: Ansible uses a socket with predictable filename in /tmp. Affects ansible versions < 1.2.3. Fixed in 1.2.3. How to fix ↓
Also tracked for
- ansible · Debian:11
The same CVE-2013-4259 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.
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 that allows users to automate IT tasks such as configuration management, application deployment, and orchestration. It is widely used in the industry for its simplicity and flexibility. However, a vulnerability has been discovered in Ansible versions prior to 1.2.3 that allows local users to redirect an SSH session through a symlink attack on a socket file with a predictable name in the /tmp/ directory.
Vulnerability Detail
The vulnerability exists in the runner/connection_plugins/ssh.py file of Ansible. When using ControlPersist, a local user can create a symlink to a socket file with a predictable name in the /tmp/ directory. This symlink can then be used to redirect an SSH session, potentially allowing unauthorized access or manipulation of the session. This vulnerability can be exploited by an attacker with local access to the system where Ansible is running.
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 possible, users can mitigate the vulnerability by disabling the ControlPersist feature in their Ansible configuration. This can be done by setting the 'control_persist' option to 'no' in the ansible.cfg file. However, disabling ControlPersist may impact the performance of SSH connections in Ansible.
Conclusion
In conclusion, the vulnerability (CVE-2013-4259) in Ansible versions prior to 1.2.3 allows local users to redirect SSH sessions through a symlink attack. Upgrading to the latest version of Ansible or disabling the ControlPersist feature can mitigate this vulnerability. For further support on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for ansible →
FAQ
Ansible is an open-source automation tool used for configuration management, application deployment, and orchestration.
This vulnerability allows local users to redirect SSH sessions, potentially leading to unauthorized access or manipulation of the session.
Users of Ansible versions prior to 1.2.3 are affected by this vulnerability.
To fix this vulnerability, upgrade to Ansible version 1.2.3 or later.
Yes, users can disable the ControlPersist feature in their Ansible configuration as a temporary workaround.
Related vulnerabilities
Recent vulnerabilities recorded for ansible.