WebAssembly Security
O 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.
● Exemplos
- 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.
● Perguntas frequentes
O 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. Pertence à categoria Segurança de aplicações da cibersegurança.
O que 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.
Como 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.
Como se defender contra WebAssembly Security?
As defesas contra WebAssembly Security costumam combinar controles técnicos e práticas operacionais, conforme detalhado na definição acima.
Quais são outros nomes para WebAssembly Security?
Nomes alternativos comuns: Wasm security, WASI security.
● Termos relacionados
- appsec№ 145
Sandbox do Navegador
Camada de isolamento ao nível do sistema operativo que confina o renderer e processos auxiliares do navegador para que código web comprometido não aceda ao sistema de ficheiros nem a outras aplicações.
- appsec№ 744
Seguranca de memoria
A seguranca de memoria e a propriedade de um programa nunca ler, escrever ou executar memoria que nao tenha alocado legitimamente, eliminando classes inteiras de vulnerabilidades.
- appsec№ 745
Linguagens com seguranca de memoria
Linguagens com seguranca de memoria como Rust, Go, Swift, Java e C# impedem os erros espaciais e temporais de memoria que originam a maioria das vulnerabilidades exploraveis em C e C++.
- appsec№ 1064
Propriedades de seguranca do Rust
O Rust impoe seguranca de memoria e de threads em tempo de compilacao via ownership, borrowing e lifetimes, eliminando UAF e data races sem garbage collector.
- appsec№ 237
Política de Segurança de Conteúdo (CSP)
Cabeçalho HTTP que informa ao navegador quais origens de scripts, estilos, frames e outros conteúdos são permitidas, limitando o impacto de XSS e injeções de dados.
- appsec№ 1164
Isolamento de Sites
Arquitetura de segurança do Chromium que coloca documentos de sites diferentes em processos separados do sistema operativo, impedindo que um renderer comprometido leia dados de outros sites.