This is why you should use Tor only with a series of VMs, one with internet and tor access to act as a router and the other which can only access the router vm. This lowers the attack surface to just that of Tor's proxy interface and your VM isolation. A physical implementation of this could be done for increased security.