Symlink Attack Vulnerability in Ansible SSH ControlPersist

ansible Updated 02 Oct 2025

Summary

16/09/2013
N/A
Yes i
Unrated
Not published

CVE-2013-4259: runner/connection_plugins/ssh.py in Ansible before 1.2.3, when using ControlPersist, allows local users to redirect a ssh session via a symlink attack on a socket file with a predictable name in /tmp/. Affects ansible versions < 1.3.4+dfsg-1. Fixed in 1.3.4+dfsg-1. 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 that simplifies the management of systems, applications, and networks. It allows users to automate tasks such as configuration management, application deployment, and orchestration. The tool operates through modules that can be executed on remote machines via SSH. However, prior to version 1.2.3, Ansible had a vulnerability in its SSH connection plugin that could be exploited by local users to redirect SSH sessions through a symlink attack on a socket file with a predictable name in the /tmp/ directory.

Vulnerability Detail

The vulnerability identified as CVE-2013-4259 exists in the runner/connection_plugins/ssh.py file of Ansible versions before 1.2.3. When using the ControlPersist feature, local users can create a symlink to the socket file, allowing them to redirect SSH sessions. This could lead to unauthorized access to sensitive information or control over the SSH session, posing significant security risks.

How To Fix

Minimum fixed version

1.3.4+dfsg-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade ansible

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

Workaround

As a temporary workaround, users can disable the ControlPersist feature in their SSH configuration to mitigate the risk of this vulnerability. This can be done by editing the SSH configuration file (usually located at /etc/ssh/ssh_config or ~/.ssh/config) and adding the following line: ControlPersist no.

Conclusion

CVE-2013-4259 is a significant vulnerability affecting Ansible versions before 1.2.3, allowing local users to exploit SSH sessions through a symlink attack. Users are strongly advised to upgrade to the latest version to mitigate risks. Additionally, temporary workarounds are available to enhance security until the upgrade can be performed.

See every vulnerability recorded for ansible →

Share this vulnerability

FAQ

CVE-2013-4259 is a vulnerability in Ansible that allows local users to redirect SSH sessions through a symlink attack on a socket file.

You can check your Ansible version by running the command 'ansible --version' in your terminal. If it is below 1.3.4, it is affected.

The risks include unauthorized access to SSH sessions, potential data breaches, and control over remote systems.

Yes, you can use Vulert, which monitors and alerts for open-source vulnerabilities in your software using a manifest file like package-lock.json.

Yes, you can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without any signup.

Related vulnerabilities

Recent vulnerabilities recorded for ansible.

How To Fix

Minimum fixed version

1.3.4+dfsg-1

This is the first release that contains the fix.

sudo apt-get install --only-upgrade ansible

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