GHSA-hqp6-mjw3-f586

Suggest an improvement
Source
https://github.com/advisories/GHSA-hqp6-mjw3-f586
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/07/GHSA-hqp6-mjw3-f586/GHSA-hqp6-mjw3-f586.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-hqp6-mjw3-f586
Aliases
  • CVE-2025-34075
Published
2025-07-02T21:32:00Z
Modified
2025-07-03T13:12:12.795644Z
Severity
  • 5.4 (Medium) CVSS_V4 - CVSS:4.0/AV:L/AC:L/AT:P/PR:L/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X CVSS Calculator
Summary
HashiCorp Vagrant has code injection vulnerability through default synced folders
Details

An authenticated virtual machine escape vulnerability exists in HashiCorp Vagrant versions 2.4.6 and below 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.

Database specific
{
    "github_reviewed": true,
    "nvd_published_at": "2025-07-02T20:15:29Z",
    "severity": "MODERATE",
    "cwe_ids": [
        "CWE-276",
        "CWE-668",
        "CWE-94"
    ],
    "github_reviewed_at": "2025-07-03T12:59:35Z"
}
References

Affected packages

RubyGems / vagrant

Package

Name
vagrant
Purl
pkg:gem/vagrant

Affected ranges

Type
ECOSYSTEM
Events
Introduced
2.2.10
Fixed
2.4.7

Affected versions

2.*

2.4.4
2.4.5
2.4.6