If you want to run untrusted software, then it should be run in an isolated environment as much as possible. At minimum, this means that you have to use a Virtual Machine, but also that you have to not attach it to a network interface, and not share resources if not necessary (e.g. clipboard, storage). If you do need network connectivity, make sure that the network is shielded from sensitive network-accessible services on your computer and local network.
Especially in Chrome, browser extensions are supposedly well-isolated from the system. E.g. extensions installed from the Chrome Web Store do not have access to local files by default. There are exceptions though: Extensions loaded from "Load unpacked extension" at
chrome://extensions' get local file access by default.
And there are sometimes bugs in the browser that allow extensions to do more than they should (this is why you should always test in the newest (stable) version of a browser - new security bugs are found and fixed in every release).
A well-configured Virtual Machine generally provides sufficient protection against malicious browser extensions. But you should be careful with deriving conclusions:
- It is okay to use a VM to test functionality (e.g. if you want to test an ad blocker, you can visit a website and see if the ads are gone.).
- The absence of malicious behavior cannot be used to prove that the extension is not malicious. Extensions could obscure or postpone execution of malicious code. I have seen quite some "ad blocker" forks that bury malicious code too between the seemingly legitimate code.
If you need a high level of certainty of what an extension does, then you should read its source code, e.g. using the Extension Source Viewer (disclosure: I authored this software).