That depends.
If this is a Linux guest on a Linux host and both are just your average distros, then it's fine~ish. It's not 100% safe as some malware is able to escape a VM, see this for a recent example of this.
Doing your shady stuff within a disposable air-gapped^[In this context, I just mean it has only had the least amount of possible privileges/capabilities during its lifetime.] VM on a RISC-V powered Sculpt OS host should be pretty safe, though.