Home:ALL Converter>Can you exploit emscripten-compiled Wasm to run arbitrary JavaScript?

Can you exploit emscripten-compiled Wasm to run arbitrary JavaScript?

Ask Time:2019-02-12T17:16:53         Author:Vesa Norilo

Json Formatter

I'm trying to understand the threat level of the following scenario in a web application:

  • Web app contains a C++ component compiled to Wasm by Emscripten
  • Runs 3rd party Wasm blobs (assume fully untrusted)
  • Assume neither blob can call back to JS via import/export
  • All Wasm blobs share memory

So, obviously a malicious blob could clobber the memory used by the C++ component. I'm wondering how likely it is that it could somehow run arbitrary JS in the context of the web app, ie. inject a script via some of the hooks emscripten puts into Module.

Thanks!!

Author:Vesa Norilo,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/54646505/can-you-exploit-emscripten-compiled-wasm-to-run-arbitrary-javascript
yy