Achilles' Heel of JS Engines: Exploiting Modern Browsers During WASM Execution

skim AI Analysis | Black Hat

Black Hat's Achilles' Heel of JS Engines: Exploiting Modern Browsers During WASM Execution: skim's analysis identifies 10 key moments. Security researchers analyze the WebAssembly execution phase across Chrome, Firefox, and Safari, demonstrating why execution bugs are easier to exploit than compilation bugs.

Category: Tech. Format: Educational. YouTube video analyzed by skim.

Summary

Security researchers analyze the WebAssembly execution phase across Chrome, Firefox, and Safari, demonstrating why execution bugs are easier to exploit than compilation bugs. Using a modified Fuzzilli and AFL++ fuzzing pipeline, they uncovered over 10 vulnerabilities in runtime builds, bytecode execution, and JS-WASM glue code, achieving remote code execution.

skim AI Analysis

Credibility assessment: Primary Vulnerability Research. The presentation delivers original offensive security research backed by concrete vulnerability disclosures across Chrome, Firefox, and Safari, custom fuzzing tooling built on Fuzzilli and AFL++, and a live remote code execution demonstration.

Bias assessment: Offensive Research Perspective. The talk is highly technical and empirical, framing browser internals from an attacker and bug-hunter viewpoint without commercial promotion or ideological spin.

Originality: 94% — Novel Browser Attack Surface. The researchers introduce a structured taxonomy for WebAssembly execution-phase bugs, build a dual-generator fuzzing pipeline with error-log regex filtering, and demonstrate new exploitation techniques.

Depth: 93% — Deep Engine Internals. The analysis traces vulnerabilities down to compiler wrappers, stack slot sizing, SIMD data conversions, SpiderMonkey frame pointers, and assembly-level integer overflows.

Key Points (10)

1. Why WASM Execution Beats Compilation for Exploits

Timestamp: 00:00:17 to 00:02:58

While earlier WebAssembly vulnerabilities centered on compilation errors and basic memory isolation, new proposals like garbage collection have shifted the attack surface toward the execution phase. Because WebAssembly operates directly on the stack and registers with fewer security checks and internal fuzzers than JavaScript, execution bugs are significantly more exploitable than compilation bugs. Consequently, the researchers targeted the execution phase to find exploitable browser flaws.

Significance (High): Highlights a structural security gap where low-level WebAssembly execution bypasses the dense runtime mitigations built for JavaScript.

Sources in support: YouTube: Black Hat (Conference Channel and Unidentified First Presenter)

2. Runtime Build Flaws and Pwn2Own 2024 Type Confusion

Timestamp: 00:02:58 to 00:06:17

The WebAssembly execution phase divides into runtime build, bytecode execution, and external interaction. During the runtime build phase, which handles engine initialization, call frames, and on-stack replacement, missing boundary checks on complex contexts can cause critical vulnerabilities. In a Pwn2Own 2024 Chrome bug, missing range checks allowed user-defined types to be treated as system-defined types, resulting in type confusion.

Significance (High): Demonstrates how initialization and context-switching flaws in the WASM runtime build phase directly enable browser compromises.

Sources in support: YouTube: Black Hat (Conference Channel and Unidentified First Presenter)

3. Bytecode Execution and Isolated Glue Code Wrappers

Timestamp: 00:06:20 to 00:11:04

In V8, WebAssembly bytecode is compiled by Liftoff and dynamically optimized by TurboFan, where newly introduced proposals like garbage collection have led to four remote code execution vulnerabilities. Furthermore, active interactions between JavaScript and WebAssembly rely on glue code wrappers to convert variables like i32 and SMI across incompatible type systems. Because neither the JavaScript nor WebAssembly optimizer fully manages this glue code, invalid signatures and inlining errors trigger type confusion.

Significance (High): Exposes the boundary between JavaScript and WebAssembly compilers as an unmonitored blind spot prone to type conversion flaws.

Sources in support: YouTube: Black Hat (Conference Channel and Unidentified First Presenter)

4. Exception Handling and GC Break Isolation

Timestamp: 00:11:05 to 00:14:16

Passive interactions between JavaScript and WebAssembly weaken memory isolation through features like cross-language try-catch exception handling and ArrayBuffer memory growth side effects. Additionally, the WebAssembly garbage collection proposal introduces non-linear data structures like WASM arrays and structs to support high-level languages. Rather than the garbage collector itself failing, these new struct objects break existing JavaScript security assumptions by allowing multiple definitions of the same object property.

Significance (Medium): Shows that adding high-level language features to WebAssembly reintroduces classic memory corruption classes like use-after-free.

Sources in support: YouTube: Black Hat (Conference Channel and Unidentified First Presenter)

5. Bohan Liu Builds Dual-Generator Fuzzing with Fuzzilli

Timestamp: 00:14:26 to 00:19:06

To test complex execution interactions, Bohan Liu explains how the team enriched their WebAssembly generator and paired it with Fuzzilli to mutate shared import and export objects. They also added 10 template additions targeting garbage collection loops, inlining, and cross-language exception handling between WebAssembly and JavaScript. To power both generators simultaneously, they split AFL++ random byte outputs using a 1,000-byte cutoff length.

Significance (High): Provides a practical blueprint for fuzzing cross-language browser interactions by synchronizing independent code generators.

Sources in support: Bohan Liu (Senior Security Researcher, Tencent Security Xuanwu Lab)

6. Regex Error Filtering Uncovers Over 10 Browser Bugs

Timestamp: 00:19:09 to 00:21:06

During initial fuzzing, most generated samples triggered syntax or compilation errors and failed to reach the execution phase. Observing that browser engines produce distinct error logs for parsing and compilation versus runtime execution, the team added a regular expression matching strategy to AFL++. By removing compilation failures from the corpus and only mutating execution-phase samples, their fuzzer uncovered over 10 vulnerabilities.

Significance (High): Demonstrates how simple output-stage filtering in mutation fuzzers dramatically increases code coverage in deep execution paths.

Sources in support: Bohan Liu (Senior Security Researcher, Tencent Security Xuanwu Lab)

7. V8 SIMD Wrapper Flaw Enables Fake Object Primitives

Timestamp: 00:21:08 to 00:25:02

In Chrome's V8 engine, a patch for JS-to-WASM inlining failed to verify whether generic WASM-to-JS wrapper features were enabled before emitting wrapper code. When converting parameters on the stack via GetStackSlot, the translator copies data in 8-byte or 4-byte pointer chunks, whereas SIMD values occupy 16 bytes on the stack. This mismatch splits a 16-byte SIMD value into two variables while keeping the original signature, creating a type confusion that yields a fake JavaScript object primitive.

Significance (High): Reveals how a mismatch between 16-byte SIMD stack values and 8-byte pointer copying breaks V8 type safety and sandbox boundaries.

Sources in support: Bohan Liu (Senior Security Researcher, Tencent Security Xuanwu Lab)

8. Bohan Liu Demonstrates Chrome RCE via Heap Spraying

Timestamp: 00:25:03 to 00:28:07

To exploit the V8 fake object primitive without an initial address leak, Bohan Liu uses heap spraying by allocating large ArrayBuffers containing fake JavaScript string objects at predictable high memory addresses. After placing marked objects in the V8 heap, the exploit uses the fake string's slice method to scan memory, locate the markers, and transfer a fake object into an ArrayBuffer for arbitrary read/write. A live demonstration on Android pops a calculator, and on 64-bit systems, hardcoded strings provide stable fake object addresses.

Significance (High): Proves that unverified stack data in WASM-to-JS transitions can be weaponized into full remote code execution on Chrome.

Sources in support: Bohan Liu (Senior Security Researcher, Tencent Security Xuanwu Lab)

9. SpiderMonkey Tail Call Bug and Missing Type Checks

Timestamp: 00:28:10 to 00:32:06

In Firefox's SpiderMonkey engine, a tail call optimization bug moves the frame pointer too far when recycling stack frames, overwriting caller local variables when copying child arguments. Because SpiderMonkey's generated assembly for WASM array access only checks the array index against the length and hardcodes the type offset without dynamic type checking, overwriting an i32Array reference with an i64Array reference enables out-of-bounds read and write. Combining this with JIT spraying via float arrays achieves shellcode execution.

Significance (High): Shows that relying on static WebAssembly type checks leaves engines defenseless once memory corruption alters a stack reference.

Sources in support: Bohan Liu (Senior Security Researcher, Tencent Security Xuanwu Lab)

10. Firefox Array Allocation Integer Overflow and Patch Gap

Timestamp: 00:32:07 to 00:36:45

A second Firefox vulnerability stems from an integer overflow in the length variable of array.new within generated assembly code, causing an undersized inline allocation and an out-of-bounds read/write primitive. By swapping data fields between two WebAssembly arrays, the researchers leaked object addresses as i32 values without triggering checks and completed the exploit. When reviewing the vendor patch, they discovered the exact same integer overflow remained unpatched in the adjacent else branch for Baseline compiler array allocations.

Significance (High): Illustrates how incomplete root-cause analysis during patching leaves identical integer overflows exposed in adjacent code paths.

Sources in support: Bohan Liu (Senior Security Researcher, Tencent Security Xuanwu Lab)

Key Sources

  • YouTube: Black Hat — Conference Channel and Unidentified First Presenter
  • Bohan Liu — Senior Security Researcher, Tencent Security Xuanwu Lab

This analysis was generated by skim (skim.plus), an AI-powered content analysis platform by Credible AI. Scores and classifications represent the platform's AI-generated assessment and should be considered alongside other sources.