{"id":"UBUNTU-CVE-2022-42717","details":"An issue was discovered in Hashicorp Packer before 2.3.1. The recommended sudoers configuration for Vagrant on Linux is insecure. If the host has been configured according to this documentation, non-privileged users on the host can leverage a wildcard in the sudoers configuration to execute arbitrary commands as root.","modified":"2025-10-24T04:53:56Z","published":"2022-10-11T23:15:00Z","upstream":["CVE-2022-42717"],"references":[{"type":"REPORT","url":"https://ubuntu.com/security/CVE-2022-42717"},{"type":"REPORT","url":"https://discuss.hashicorp.com/t/hcsec-2022-23-vagrant-nfs-sudoers-configuration-allows-for-local-privilege-escalation/45423"},{"type":"REPORT","url":"https://github.com/hashicorp/vagrant/pull/12910"},{"type":"REPORT","url":"https://www.vagrantup.com/docs/synced-folders/nfs"},{"type":"REPORT","url":"https://www.cve.org/CVERecord?id=CVE-2022-42717"}],"affected":[{"package":{"name":"vagrant","ecosystem":"Ubuntu:16.04:LTS","purl":"pkg:deb/ubuntu/vagrant@1.8.1+dfsg-1ubuntu0.2?arch=source&distro=xenial"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.7.4+dfsg-1","1.8.1+dfsg-1","1.8.1+dfsg-1ubuntu0.1","1.8.1+dfsg-1ubuntu0.2"],"ecosystem_specific":{"binaries":[{"binary_name":"vagrant","binary_version":"1.8.1+dfsg-1ubuntu0.2"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-42717.json"}},{"package":{"name":"vagrant","ecosystem":"Ubuntu:18.04:LTS","purl":"pkg:deb/ubuntu/vagrant@2.0.2+dfsg-2ubuntu8?arch=source&distro=bionic"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.9.1+dfsg-1","2.0.2+dfsg-2ubuntu2","2.0.2+dfsg-2ubuntu8"],"ecosystem_specific":{"binaries":[{"binary_name":"vagrant","binary_version":"2.0.2+dfsg-2ubuntu8"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-42717.json"}},{"package":{"name":"vagrant","ecosystem":"Ubuntu:20.04:LTS","purl":"pkg:deb/ubuntu/vagrant@2.2.6+dfsg-2ubuntu3?arch=source&distro=focal"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.2.3+dfsg-1ubuntu2","2.2.6+dfsg-2ubuntu1","2.2.6+dfsg-2ubuntu3"],"ecosystem_specific":{"binaries":[{"binary_name":"vagrant","binary_version":"2.2.6+dfsg-2ubuntu3"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-42717.json"}},{"package":{"name":"vagrant","ecosystem":"Ubuntu:22.04:LTS","purl":"pkg:deb/ubuntu/vagrant@2.2.19+dfsg-1ubuntu1?arch=source&distro=jammy"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.2.14+dfsg-1ubuntu1","2.2.19+dfsg-1ubuntu1"],"ecosystem_specific":{"binaries":[{"binary_name":"vagrant","binary_version":"2.2.19+dfsg-1ubuntu1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2022/UBUNTU-CVE-2022-42717.json"}}],"schema_version":"1.7.3","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"},{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"},{"type":"Ubuntu","score":"medium"}]}