WebAssembly Security
Qu'est-ce que 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.
● Exemples
- 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.
● Questions fréquentes
Qu'est-ce que 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. Cette notion relève de la catégorie Sécurité applicative en cybersécurité.
Que signifie 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.
Comment fonctionne 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.
Comment se défendre contre WebAssembly Security ?
Les défenses contre WebAssembly Security combinent habituellement des contrôles techniques et des pratiques opérationnelles, comme détaillé dans la définition ci-dessus.
Quels sont les autres noms de WebAssembly Security ?
Noms alternatifs courants : Wasm security, WASI security.
● Termes liés
- appsec№ 145
Sandbox de Navigateur
Couche d'isolation au niveau OS qui confine les processus renderer et auxiliaires du navigateur afin qu'un code web compromis ne puisse pas lire le système de fichiers ni d'autres applications.
- appsec№ 744
Securite memoire
La securite memoire est la propriete qu'un programme ne lise, n'ecrive ni n'execute jamais une memoire qu'il n'a pas legitimement allouee, ce qui supprime des classes entieres de vulnerabilites.
- appsec№ 745
Langages memory safe
Les langages memory safe comme Rust, Go, Swift, Java et C# empechent les erreurs memoire spatiales et temporelles qui causent la majorite des vulnerabilites exploitables en C et C++.
- appsec№ 1064
Proprietes de securite de Rust
Rust applique la securite memoire et de threads a la compilation via ownership, borrowing et lifetimes, eliminant use-after-free et data races sans ramasse-miettes.
- appsec№ 237
Politique de sécurité du contenu (CSP)
En-tête HTTP indiquant au navigateur quelles sources de scripts, styles, cadres et autres contenus sont autorisées, limitant l'impact des XSS et des injections de données.
- appsec№ 1164
Isolation des Sites
Architecture de sécurité de Chromium qui place les documents de sites distincts dans des processus système séparés afin qu'un renderer compromis ne puisse pas lire les données d'autres sites.