WebAssembly Security
Что такое 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.
● Примеры
- 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.
● Частые вопросы
Что такое 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. Относится к категории Безопасность приложений в кибербезопасности.
Что означает 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.
Как работает 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.
Как защититься от WebAssembly Security?
Защита от WebAssembly Security обычно сочетает технические меры и операционные практики, как описано в определении выше.
Какие есть другие названия WebAssembly Security?
Распространённые альтернативные названия: Wasm security, WASI security.
● Связанные термины
- appsec№ 145
Песочница браузера
Слой изоляции уровня ОС, ограничивающий рендерер и вспомогательные процессы браузера, чтобы скомпрометированный веб-код не мог читать файловую систему или другие приложения.
- appsec№ 744
Безопасность памяти
Безопасность памяти — свойство, при котором программа никогда не читает, не пишет и не исполняет память, которую она не выделяла легитимно, что устраняет целые классы уязвимостей.
- appsec№ 745
Языки с безопасной памятью
Языки с безопасной памятью, такие как Rust, Go, Swift, Java и C#, исключают пространственные и временные ошибки памяти, на которых строится большинство эксплойтов C и C++.
- appsec№ 1064
Свойства безопасности Rust
Rust обеспечивает безопасность памяти и потоков на этапе компиляции через владение, заимствования и времена жизни, устраняя UAF и гонки данных без сборщика мусора.
- appsec№ 237
Политика безопасности контента (CSP)
HTTP-заголовок ответа, указывающий браузеру, какие источники скриптов, стилей, фреймов и других ресурсов допустимы, что снижает последствия XSS и инъекций данных.
- appsec№ 1164
Изоляция сайтов
Архитектура безопасности Chromium, помещающая документы разных сайтов в отдельные процессы ОС, чтобы скомпрометированный рендерер не мог читать данные других сайтов.