CVE-2025-34075

An authenticated virtual machine escape vulnerability exists in HashiCorp Vagrant when using the default synced folder configuration. By design, Vagrant automatically mounts the host system’s project directory into the guest VM under /vagrant (or C:\vagrant on Windows). This includes the Vagrantfile configuration file, which is a Ruby script evaluated by the host every time a vagrant command is executed in the project directory. If a low-privileged attacker obtains shell access to the guest VM, they can append arbitrary Ruby code to the mounted Vagrantfile. When a user on the host later runs any vagrant command, the injected code is executed on the host with that user’s privileges. While this shared-folder behavior is well-documented by Vagrant, the security implications of Vagrantfile execution from guest-writable storage are not explicitly addressed. This effectively enables guest-to-host code execution in multi-tenant or adversarial VM scenarios.
CVSS

No CVSS.

Configurations

No configuration.

History

03 Jul 2025, 15:13

Type Values Removed Values Added
Summary
  • (es) Existe una vulnerabilidad de escape de máquina virtual autenticada en HashiCorp Vagrant al usar la configuración predeterminada de carpetas sincronizadas. Por diseño, Vagrant monta automáticamente el directorio del proyecto del sistema host en la máquina virtual invitada, bajo /vagrant (o C:\vagrant en Windows). Esto incluye el archivo de configuración Vagrantfile, un script de Ruby que el host evalúa cada vez que se ejecuta un comando de Vagrant en el directorio del proyecto. Si un atacante con pocos privilegios obtiene acceso de shell a la máquina virtual invitada, puede añadir código Ruby arbitrario al Vagrantfile montado. Cuando un usuario del host ejecuta posteriormente cualquier comando de Vagrant, el código inyectado se ejecuta en el host con los privilegios de ese usuario. Si bien Vagrant documenta exhaustivamente este comportamiento de carpeta compartida, no se abordan explícitamente las implicaciones de seguridad de la ejecución de Vagrantfile desde el almacenamiento con permisos de escritura del huésped. Esto permite la ejecución de código de huésped a host en escenarios de máquinas virtuales multiinquilino o adversarias.

02 Jul 2025, 21:15

Type Values Removed Values Added
References () https://raw.githubusercontent.com/rapid7/metasploit-framework/master/modules/exploits/multi/local/vagrant_synced_folder_vagrantfile_breakout.rb - () https://raw.githubusercontent.com/rapid7/metasploit-framework/master/modules/exploits/multi/local/vagrant_synced_folder_vagrantfile_breakout.rb -

02 Jul 2025, 20:15

Type Values Removed Values Added
New CVE

Information

Published : 2025-07-02 20:15

Updated : 2025-07-03 15:13


NVD link : CVE-2025-34075

Mitre link : CVE-2025-34075

CVE.ORG link : CVE-2025-34075


JSON object : View

Products Affected

No product.

CWE
CWE-94

Improper Control of Generation of Code ('Code Injection')

CWE-276

Incorrect Default Permissions

CWE-668

Exposure of Resource to Wrong Sphere