ID CVE-2016-3096
Summary The create_script function in the lxc_container module in Ansible before 1.9.6-1 and 2.x before 2.0.2.0 allows local users to write to arbitrary files or gain privileges via a symlink attack on (1) /opt/.lxc-attach-script, (2) the archived container in the archive_path directory, or the (3) lxc-attach-script.log or (4) lxc-attach-script.err files in the temporary directory.
References
Vulnerable Configurations
  • Fedora 22
    cpe:2.3:o:fedoraproject:fedora:22
  • Fedora Project Fedora 23
    cpe:2.3:o:fedoraproject:fedora:23
  • Fedora 24
    cpe:2.3:o:fedoraproject:fedora:24
  • Red Hat Ansible 1.9.6
    cpe:2.3:a:redhat:ansible:1.9.6
  • Red Hat Ansible 2.0
    cpe:2.3:a:redhat:ansible:2.0
  • Red Hat Ansible 2.0.1
    cpe:2.3:a:redhat:ansible:2.0.1
CVSS
Base: 7.2 (as of 06-06-2016 - 15:26)
Impact:
Exploitability:
CWE CWE-59
CAPEC
  • Symlink Attack
    An attacker positions a symbolic link in such a manner that the targeted user or application accesses the link's endpoint, assuming that it is accessing a file with the link's name. The endpoint file may be either output or input. If the file is output, the result is that the endpoint is modified, instead of a file at the intended location. Modifications to the endpoint file may include appending, overwriting, corrupting, changing permissions, or other modifications. In some variants of this attack the attacker may be able to control the change to a file while in other cases they cannot. The former is especially damaging since the attacker may be able to grant themselves increased privileges or insert false information, but the latter can also be damaging as it can expose sensitive information or corrupt or destroy vital system or application files. Alternatively, the endpoint file may serve as input to the targeted application. This can be used to feed malformed input into the target or to cause the target to process different information, possibly allowing the attacker to control the actions of the target or to cause the target to expose information to the attacker. Moreover, the actions taken on the endpoint file are undertaken with the permissions of the targeted user or application, which may exceed the permissions that the attacker would normally have.
  • Accessing, Modifying or Executing Executable Files
    An attack of this type exploits a system's configuration that allows an attacker to either directly access an executable file, for example through shell access; or in a possible worst case allows an attacker to upload a file and then execute it. Web servers, ftp servers, and message oriented middleware systems which have many integration points are particularly vulnerable, because both the programmers and the administrators must be in synch regarding the interfaces and the correct privileges for each interface.
  • Leverage Executable Code in Non-Executable Files
    An attack of this type exploits a system's trust in configuration and resource files, when the executable loads the resource (such as an image file or configuration file) the attacker has modified the file to either execute malicious code directly or manipulate the target process (e.g. application server) to execute based on the malicious configuration parameters. Since systems are increasingly interrelated mashing up resources from local and remote sources the possibility of this attack occurring is high. The attack can be directed at a client system, such as causing buffer overrun through loading seemingly benign image files, as in Microsoft Security Bulletin MS04-028 where specially crafted JPEG files could cause a buffer overrun once loaded into the browser. Another example targets clients reading pdf files. In this case the attacker simply appends javascript to the end of a legitimate url for a pdf (http://www.gnucitizen.org/blog/danger-danger-danger/) http://path/to/pdf/file.pdf#whatever_name_you_want=javascript:your_code_here The client assumes that they are reading a pdf, but the attacker has modified the resource and loaded executable javascript into the client's browser process. The attack can also target server processes. The attacker edits the resource or configuration file, for example a web.xml file used to configure security permissions for a J2EE app server, adding role name "public" grants all users with the public role the ability to use the administration functionality. The server trusts its configuration file to be correct, but when they are manipulated, the attacker gains full control.
  • Manipulating Input to File System Calls
    An attacker manipulates inputs to the target software which the target software passes to file system calls in the OS. The goal is to gain access to, and perhaps modify, areas of the file system that the target software did not intend to be accessible.
Access
VectorComplexityAuthentication
LOCAL LOW NONE
Impact
ConfidentialityIntegrityAvailability
COMPLETE COMPLETE COMPLETE
nessus via4
  • NASL family FreeBSD Local Security Checks
    NASL id FREEBSD_PKG_253C688906F011E6925F6805CA0B3D42.NASL
    description Ansible developers report : CVE-2016-3096: do not use predictable paths in lxc_container - do not use a predictable filename for the LXC attach script - don't use predictable filenames for LXC attach script logging - don't set a predictable archive_path this should prevent symlink attacks which could result in - data corruption - data leakage - privilege escalation
    last seen 2018-11-13
    modified 2018-11-10
    plugin id 90606
    published 2016-04-21
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=90606
    title FreeBSD : ansible -- use of predictable paths in lxc_container (253c6889-06f0-11e6-925f-6805ca0b3d42)
  • NASL family Fedora Local Security Checks
    NASL id FEDORA_2016-AB154C56DD.NASL
    description Update to 2.0.2.0. https://github.com/ansible/ansible/blob/stable-2.0/CHANGELOG.md Note that Tenable Network Security has extracted the preceding description block directly from the Fedora security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen 2019-02-21
    modified 2016-10-18
    plugin id 90816
    published 2016-05-02
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=90816
    title Fedora 22 : ansible-2.0.2.0-1.fc22 (2016-ab154c56dd)
  • NASL family Gentoo Local Security Checks
    NASL id GENTOO_GLSA-201607-14.NASL
    description The remote host is affected by the vulnerability described in GLSA-201607-14 (Ansible: Privilege escalation) The create_script function in the lxc_container module of Ansible uses predictable temporary file names, making it vulnerable to a symlink attack. Impact : Local attackers could write arbitrary files or gain escalated privileges within the container. Workaround : There is no known workaround at this time.
    last seen 2019-02-21
    modified 2016-10-10
    plugin id 92484
    published 2016-07-21
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=92484
    title GLSA-201607-14 : Ansible: Privilege escalation
  • NASL family Fedora Local Security Checks
    NASL id FEDORA_2016-28FF51A3F5.NASL
    description Update to 1.9.6. Fixes bug #1327744 as well as CVE-2016-3096 Note that Tenable Network Security has extracted the preceding description block directly from the Fedora security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen 2019-02-21
    modified 2016-10-18
    plugin id 90728
    published 2016-04-27
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=90728
    title Fedora 22 : ansible1.9-1.9.6-1.fc22 (2016-28ff51a3f5)
  • NASL family Fedora Local Security Checks
    NASL id FEDORA_2016-679C4DDD3C.NASL
    description Update to 2.0.2.0. https://github.com/ansible/ansible/blob/stable-2.0/CHANGELOG.md Note that Tenable Network Security has extracted the preceding description block directly from the Fedora security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen 2019-02-21
    modified 2016-10-18
    plugin id 90958
    published 2016-05-09
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=90958
    title Fedora 24 : ansible-2.0.2.0-1.fc24 (2016-679c4ddd3c)
  • NASL family Fedora Local Security Checks
    NASL id FEDORA_2016-CD3CF8E7D0.NASL
    description Update to 2.0.2.0. https://github.com/ansible/ansible/blob/stable-2.0/CHANGELOG.md Note that Tenable Network Security has extracted the preceding description block directly from the Fedora security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen 2019-02-21
    modified 2016-10-18
    plugin id 90817
    published 2016-05-02
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=90817
    title Fedora 23 : ansible-2.0.2.0-1.fc23 (2016-cd3cf8e7d0)
  • NASL family Fedora Local Security Checks
    NASL id FEDORA_2016-65519440F5.NASL
    description Update to 1.9.6. Fixes bug #1327744 as well as CVE-2016-3096 Note that Tenable Network Security has extracted the preceding description block directly from the Fedora security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.
    last seen 2019-02-21
    modified 2016-10-18
    plugin id 90732
    published 2016-04-27
    reporter Tenable
    source https://www.tenable.com/plugins/index.php?view=single&id=90732
    title Fedora 23 : ansible1.9-1.9.6-1.fc23 (2016-65519440f5)
refmap via4
confirm
fedora
  • FEDORA-2016-28ff51a3f5
  • FEDORA-2016-65519440f5
  • FEDORA-2016-679c4ddd3c
  • FEDORA-2016-ab154c56dd
  • FEDORA-2016-cd3cf8e7d0
gentoo GLSA-201607-14
mlist
  • [ansible-announce] 20160415 Ansible 1.9.6-1 has been released
  • [ansible-announce] 20160419 Ansible 2.0.2.0 has been released
Last major update 28-11-2016 - 15:06
Published 03-06-2016 - 10:59
Last modified 30-10-2018 - 12:28
Back to Top