"even if" you can change the program (and like some other comments indicated, I'm fairly certain that's not how linear memory in WASM works), WASM still runs on a "capability model": It has access to only certain file handles, sockets, etc. that are provided declaratively.
I was once a huge detractor and naysayer of WASM, but now I'll readily admit that this is the way security "always should have been done".