VirtualBox offers the option of using shared folders, others probably offer the same thing. I am not sure whether the host is directly accessing the memory of the guest, or if there some process which basically syncs one folder on the host with another on the guest.

But regardless, when the host and guest's processes are kept so separate from each other, I can't help thinking that there is a danger to security through this process (such as malware which might be able to break out of the guests address space by finding its way to the shared folder).

Is this possible?

1 Answer 1


A virtual machine does not access directly the memory of the host in case of shared folders. In reality, the virtual machine uses a special file system driver in the Guest Addition to talk to the host. A shared folder is implemented like pseudo-network redirector.

The only way to be sure a virtual machine won't infect its host is to develop an architecture that isolates the virtual machine from its hosts as if it separates them physically. As long as this has not been possible (AFAIK) it is not strange to read many cases on the Internet of hypervisors being escaped by malware (IBM X-Force ® 2010 Mid-Year Trend and Risk Report).

When sharing folders between the host and guest, you still have the option (at least with VirtualBox and VMWare Player that I use) to force the guest to access the shared folders in read only mode (you can copy data from the shared folder to your virtual machine but not in the opposite direction).

As for your question's title, no, shared folders do not add any security layer regarding the possibility of infection of your host. In opposite, it may be an additional attack vector especially in the case you create a shared folder with the default read AND write option.

  • 1
    You have addressed what I wanted to know with detail, thanks.
    – Ekrem
    Oct 17, 2015 at 19:34
  • A follow-up question: If I enable Shared Folders (VMware specifically), does it only expose the specific folder that is shared, or the entire host? That means, is it easier for malicious code to access anything on the host, or just the folder that's actually shared?
    – Mörre
    Jun 3, 2018 at 8:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.