Apparently WebAssembly heap memory storing generated code is not write protected at all. I guess whatever architecture they have for managing typed memory chunks doesn't make it sufficiently easy to manipulate protection bits dynamically, and the WebAssembly folks were content to leave compiled WebAssembly chunks are RWX.
It's unfortunate that this thread hasn't been upvoted. It really drives home the futility of expecting something as complex as V8 to ever be safe enough to sandbox arbitrary code. And it has little to do with the language of the implementation--the same engine re-written in Rust would have been just as susceptible to the two exploits.
I guess it's just too inconvenient to accept reality. I'm still surprised that Cloudflare and AWS have actually convinced themselves they can make such architectures secure[1]. Less shocked that everybody is else is so credulous.
Though, I am shocked that Netflix is so credulous. A recent blog post described how they use AWS Lambda functions to manage their CA private key. But, again, because of how limited KMS is I guess it's too inconvenient to not trust Lambda. KMS really should support asymmetric key operations; it's ridiculous it's still not supported. I guess AWS's KMS "cloud HSM" solution just wouldn't scale (in terms of CPU) if people could do that.
[1] Absolute security is impossible, but as complex as this exploit was it's obviously still far too trivial. It's a totally unwarranted and unreasonable expectation that bad actors are incapable of reading (if not manipulate) co-hosted Lambda or Cloudflare Worker projects. Writing a non-JIT'd engine with a simplified memory architecture is not only feasible, it would be an obvious candidate for formal verification. But the demands for performance are just too strong and so, as always, security takes a back-seat to performance and speed-to-market.