What you are describing is basically WASI [1]. Yes there are exploit concerns in the bridge layer, but it is far easier to sandbox these capabilities-based modules, than native programs. For example, many WASM runtimes are written in Rust, which greatly decreases the risk of exploits in general.
1] https://wasi.dev/