Vulnerability in Vagrant 5.0.0 Update Mechanism
A race condition vulnerability was discovered in the update mechanism of Vagrant 5.0.0. The vulnerability occurs when the user runs the command 'vagrant plugin update', which causes the plugin to reinstall, including replacing the sudo helper and re-applying root ownership and the suid bit. This is done via osascript with a block of shell as an easy way to show a graphical popup authentication dialog to the user. An attacker can exploit this vulnerability by scanning the process list watching for the invocation of osascript, and then replacing the sudo helper binary with an exploit payload. The attacker can then send a STOP signal to the installer to pause its execution, allowing the attacker to move the newly suid-root'ed binary to a safe place and execute it.