WebAssembly Security
Was ist WebAssembly Security?
WebAssembly SecurityThe security model of WebAssembly — capability-based sandbox, no ambient access to syscalls, structured control flow — plus the practical risks of memory-unsafe languages compiled to Wasm and untrusted Wasm running outside the browser.
WebAssembly (Wasm) is a portable, binary, stack-based VM with a deliberately conservative security model: linear memory is isolated from the host, control flow is structured (no arbitrary jumps), all imports are explicit, and there is no ambient I/O — a Wasm module can only do what its host (browser, runtime, WASI implementation) hands it as imported functions. Inside the browser this complements the same-origin policy and CSP; outside it (Cloudflare Workers, Fastly Compute, edge runtimes, Envoy filters, plugin systems), Wasm enables running untrusted code from third parties with capability-based controls. Security work focuses on (1) memory safety inside the module — buffer overflows in Wasm-compiled C/C++/Rust still exist and have already led to JIT-spray-style attacks on browser engines; (2) WASI capability scoping — restricting filesystem, network, and clock access per module; (3) supply-chain integrity of Wasm artifacts (component model, signed component-registry releases); and (4) side-channel resilience against Spectre, since Wasm can be a delivery vector for speculation primitives.
● Beispiele
- 01
An edge runtime gives each tenant's Wasm module a capability-scoped filesystem rooted at `/tenant/<id>` and no network sockets at all.
- 02
A vulnerability in a JPEG decoder compiled to Wasm allows out-of-bounds reads inside the module, but the host's linear-memory isolation prevents it from escaping into other processes.
● Häufige Fragen
Was ist WebAssembly Security?
The security model of WebAssembly — capability-based sandbox, no ambient access to syscalls, structured control flow — plus the practical risks of memory-unsafe languages compiled to Wasm and untrusted Wasm running outside the browser. Es gehört zur Kategorie Anwendungssicherheit der Cybersicherheit.
Was bedeutet WebAssembly Security?
The security model of WebAssembly — capability-based sandbox, no ambient access to syscalls, structured control flow — plus the practical risks of memory-unsafe languages compiled to Wasm and untrusted Wasm running outside the browser.
Wie funktioniert WebAssembly Security?
WebAssembly (Wasm) is a portable, binary, stack-based VM with a deliberately conservative security model: linear memory is isolated from the host, control flow is structured (no arbitrary jumps), all imports are explicit, and there is no ambient I/O — a Wasm module can only do what its host (browser, runtime, WASI implementation) hands it as imported functions. Inside the browser this complements the same-origin policy and CSP; outside it (Cloudflare Workers, Fastly Compute, edge runtimes, Envoy filters, plugin systems), Wasm enables running untrusted code from third parties with capability-based controls. Security work focuses on (1) memory safety inside the module — buffer overflows in Wasm-compiled C/C++/Rust still exist and have already led to JIT-spray-style attacks on browser engines; (2) WASI capability scoping — restricting filesystem, network, and clock access per module; (3) supply-chain integrity of Wasm artifacts (component model, signed component-registry releases); and (4) side-channel resilience against Spectre, since Wasm can be a delivery vector for speculation primitives.
Wie schützt man sich gegen WebAssembly Security?
Schutzmaßnahmen gegen WebAssembly Security kombinieren typischerweise technische Kontrollen und operative Praktiken, wie in der Definition oben beschrieben.
Welche anderen Bezeichnungen gibt es für WebAssembly Security?
Übliche alternative Bezeichnungen: Wasm security, WASI security.
● Verwandte Begriffe
- appsec№ 145
Browser-Sandbox
Isolationsschicht auf Betriebssystemebene, die Renderer- und Hilfsprozesse des Browsers eingrenzt, sodass kompromittierter Webcode weder Dateisystem noch andere Anwendungen erreicht.
- appsec№ 744
Speichersicherheit
Speichersicherheit (Memory Safety) ist die Eigenschaft, dass ein Programm niemals Speicher liest, schreibt oder ausfuehrt, den es nicht legitim allokiert hat, und schaltet damit ganze Schwachstellenklassen aus.
- appsec№ 745
Memory-Safe Sprachen
Memory-safe Sprachen wie Rust, Go, Swift, Java und C# verhindern die raeumlichen und zeitlichen Speicherfehler, die die meisten ausnutzbaren Luecken in C und C++ ausmachen.
- appsec№ 1064
Sicherheitseigenschaften von Rust
Rust erzwingt Speicher- und Thread-Sicherheit zur Compile-Zeit ueber Ownership, Borrowing und Lifetimes und beseitigt UAF und Data Races ohne Garbage Collector.
- appsec№ 237
Content Security Policy (CSP)
HTTP-Antwort-Header, der dem Browser mitteilt, welche Quellen für Skripte, Styles, Frames und andere Inhalte erlaubt sind, und so XSS- und Datendiebstahlangriffe begrenzt.
- appsec№ 1164
Site Isolation
Chromium-Sicherheitsarchitektur, die Dokumente unterschiedlicher Sites in separate Betriebssystemprozesse legt, sodass ein kompromittierter Renderer keine fremden Daten lesen kann.