Re:Things That Turbo Pascal Is Smaller Than (2011)
by mike_hearn on Monday November 16, 2026 @04:27AM
(#50515667)
Ahhhhh this is a common misconception and it's dangerous. V8 is not a battle tested sandboxed execution environment, not unless by battle tested you mean battle wasted. V8 is full of sandbox escape vulnerabilities practically "by design", always has been, probably always will be - and the Chrome engineers knew this from the start which is why from day one they invested so heavily in kernel-level sandboxing.
But! Very important! The kernel sandbox is NOT A PART OF V8. It's not even reusable or modular, it's a hard coded part of Chrome's startup sequence and tuned for Chrome's exact needs. If you embed V8 via its API you don't get it.
I've seen this misconception several times now including in quite serious places, where people talk as if V8 on its own has a robust sandbox. It doesn't! This will blow up in people's faces eventually.
If you want a JS engine that's secure by design then the only one I know is GraalJS, as it's written in a memory safe language and uses partial evaluation to create its compiler so you can't get interpreter/JIT mismatches. It also has a proper sandboxing API and can transparently run code out of process. They're adding Landlock support to that now so it actually will get a built in kernel sandbox on Linux.
This issue vexes me enough that I wrote a whole article about it:
But! Very important! The kernel sandbox is NOT A PART OF V8. It's not even reusable or modular, it's a hard coded part of Chrome's startup sequence and tuned for Chrome's exact needs. If you embed V8 via its API you don't get it.
I've seen this misconception several times now including in quite serious places, where people talk as if V8 on its own has a robust sandbox. It doesn't! This will blow up in people's faces eventually.
If you want a JS engine that's secure by design then the only one I know is GraalJS, as it's written in a memory safe language and uses partial evaluation to create its compiler so you can't get interpreter/JIT mismatches. It also has a proper sandboxing API and can transparently run code out of process. They're adding Landlock support to that now so it actually will get a built in kernel sandbox on Linux.
This issue vexes me enough that I wrote a whole article about it:
https://medium.com/graalvm/writing-truly-memory-safe-jit-com...