CVE-2013-4260: Medium severity red hat ansible vulnerability

Published Aug 18, 2013
·
Updated

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/tmp/ansible/.

Other sources

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/tmp/ansible/.

MITRE

Since version 1.2 of ansible, failed run ( due to connexion errors, or config error ) are listed into /var/tmp/ansible/$scriptname.yml , with $scriptname being the script name used ( or rather the playbook, in ansible linguo )

There is no verification on the file or directory here, and /var/tmp is world writable.

Worst, due to it using a subdirectory under /var/tmp, some symlink protection may not apply ( not tested ). For example, if i create a directory /var/tmp/ansible with owner misc:users and a symlink to a file of joe, the kernel would permit to follow since the symlink and owner of the directory match. This permit to erase file content among others. I am not sure what kind of specific attack could be made by injecting ip and hostname in a specific file, but I am sure this exist.

Code is on https://github.com/ansible/ansible/blob/devel/lib/ansible/playbook/init.py#L480

Upstream was not notified yet AFAIK.

I do have a patch almost ready that do : - verify the permission/owner of directory - create a unique directory derived from username ( so predictable ) with proper permission if doesn't exist

I just need to review and test.

The current code do cope with lack of permission on the directory so even if someone create a directory in advance, this will be handled "gracefully" ( I think a message would be better )

Red Hat

Affected Software

4 affected componentsFixes available
pip/ansible>=1.2<1.2.3
1.2.3
redhat ansible=1.2
redhat ansible=1.2.1
redhat ansible=1.2.2

Event History

Aug 18, 2013
Data Sourced
via Red Hat·12:17 PM
DescriptionSeverityAffected Software
Sep 16, 2013
CVE Published
via MITRE·07:00 PM
Data Sourced
via MITRE·07:00 PM
Description
Data Sourced
via NVD·07:14 PM
RemedyDescriptionSeverityWeaknessAffected Software
May 14, 2022
Advisory Published
02:03 AM

Frequently Asked Questions

1

What is the severity of CVE-2013-4260?

CVE-2013-4260 is considered to be of medium severity due to the potential for local users to overwrite arbitrary files.

2

How do I fix CVE-2013-4260?

To fix CVE-2013-4260, upgrade Ansible to version 1.2.3 or later.

3

What causes the vulnerability in CVE-2013-4260?

The vulnerability in CVE-2013-4260 is caused by the handling of playbooks that do not run due to errors, allowing for a symlink attack.

4

Which versions of Ansible are affected by CVE-2013-4260?

CVE-2013-4260 affects Ansible versions 1.2.0 to 1.2.2.

5

Is CVE-2013-4260 a remote or local vulnerability?

CVE-2013-4260 is a local vulnerability that can be exploited by local users.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203