WebAssembly Security
¿Qué es 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.
● Ejemplos
- 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.
● Preguntas frecuentes
¿Qué es 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. Pertenece a la categoría de Seguridad de aplicaciones en ciberseguridad.
¿Qué significa 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.
¿Cómo funciona 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.
¿Cómo defenderse de WebAssembly Security?
Las defensas contra WebAssembly Security combinan habitualmente controles técnicos y prácticas operativas, como se detalla en la definición.
¿Cuáles son otros nombres para WebAssembly Security?
Nombres alternativos comunes: Wasm security, WASI security.
● Términos relacionados
- appsec№ 145
Sandbox del Navegador
Capa de aislamiento a nivel de sistema operativo que confina el renderer y procesos auxiliares del navegador para que el código web comprometido no acceda al sistema de archivos u otras aplicaciones.
- appsec№ 744
Seguridad de memoria
La seguridad de memoria es la propiedad de que un programa nunca lee, escribe ni ejecuta memoria que no haya asignado legitimamente, evitando clases enteras de vulnerabilidades.
- appsec№ 745
Lenguajes con seguridad de memoria
Los lenguajes con seguridad de memoria como Rust, Go, Swift, Java y C# evitan los errores espaciales y temporales de memoria que originan la mayoria de vulnerabilidades explotables en C y C++.
- appsec№ 1064
Propiedades de seguridad de Rust
Rust impone seguridad de memoria y de hilos en tiempo de compilacion mediante ownership, borrowing y lifetimes, eliminando UAF y carreras de datos sin recolector de basura.
- appsec№ 237
Política de Seguridad de Contenidos (CSP)
Cabecera HTTP que indica al navegador qué orígenes de scripts, estilos, marcos y otros recursos están permitidos, limitando el impacto de XSS y de inyecciones de datos.
- appsec№ 1164
Aislamiento de Sitios
Arquitectura de seguridad de Chromium que coloca documentos de sitios distintos en procesos separados del sistema operativo para que un renderer comprometido no acceda a datos de otros sitios.