Skip to main content
2 of 3
fix spelling
Kilian Foth
  • 110.3k
  • 45
  • 300
  • 321

Protection against XSS using a tiny virtual-machine in browser

I'm working on a web framework that makes surveys. It has an expression manager which lets you run code on the client as Javascript. There could be a potential XSS problem when there's more than one admin, as is the case for universities. So, instead of compiling expressions to Javascript, what about compiling them to a bitcode and have a tiny VM in the browser to check for XSS? Do you think it could give better protection than just analyzing Javascript?