it is very difficult for an infected VM to infect its host frankly only a highest tier state level infection can reasonably do this. Run of the mill infections, if made well, will actually turn themselves off if they realize they are on a VM as a method to slow down computer scientists trying to study it. So unless you are an Iranian scientist you are likely fine.
It should be noted though that a VM attached/connected to your local network can spread an infection via that route to other devices connected to it.