From efe44030f1e5a9dfe86f88d61ea2cee7df6b11c2 Mon Sep 17 00:00:00 2001 From: Stephen Berard Date: Sat, 7 Mar 2026 13:41:09 +0100 Subject: [PATCH 1/4] doc(security,aot): added security guidance around AoT binaries Adds explicit guidance distinguishing trusted AoT binaries from untrusted Wasm binaries, clarifies that malformed/manipulated AoT files are bugs not security issues, and cleans up wording in the security checklist section. Signed-off-by: Stephen Berard --- doc/security_need_to_know.md | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/doc/security_need_to_know.md b/doc/security_need_to_know.md index f760e1e110..c870453bc9 100644 --- a/doc/security_need_to_know.md +++ b/doc/security_need_to_know.md @@ -5,7 +5,6 @@ This document aims to explain the process of identifying a security issue and th ## identifying a security issue It is commonly stated that a security issue is an issue that: - - Exposes sensitive information to unauthorized parties. - Allows unauthorized modification of data or system state. - Affects the availability of the system or its services. @@ -15,13 +14,25 @@ It is commonly stated that a security issue is an issue that: Given that WASI is a set of Capability-based APIs, all unauthorized actions are not supposed to happen. Most of the above security concerns can be alleviated. What remains for us is to ensure that the execution of Wasm modules is secure. In other words, do not compromise the sandbox. Unless it is explicitly disabled beforehand. +WebAssembly binaries are considered untrusted. A Wasm binary that causes a breach of the Wasm sandbox or a crash of the runtime is considered to be a potential security issue. On the other hand, Ahead-of-Time (AoT) binaries are assumed to be generated by a trusted source and using the supported toolchain. Therefore, AoT binaries are considered trusted. As such, malformed or manipulated AoT binaries that breach the sandbox or cash crashes may be considered as bugs but are not classified as security issues. + +If the AoT compiler and/or related tools emit an AoT binary that causes a breach of the Wasm sandbox or a crash is considered a potential security issue. It is assumed that the correct configuration and options are used when generating AoT binaries. Misconfiguration or misuse of the tooling options, therefore, are not considered to be security issues. + ### Is this bug considered a security vulnerability? #### For someone who finds a problem if a bug **results in crash or hang**, please treat it as a security problem and report it to a security advisor. The maintainer will look into it and change its category if needed. It is better safe than sorry. -If the author of an issue(results in crash or hang) can go through the following checklist and answer all questions with "No", it is fine to mark it as a regular bug. If not, please report it as a security issue. +If the author of an issue(results in crash or hang) can go through the checklist below and answer all questions with "No", it is fine to mark it as a regular bug. If not, please report it as a security issue. + +Does the +- Exposes sensitive information to unauthorized parties. +- Allows unauthorized modification of data or system state. +- Affects the availability of the system or its services. +- Permits unauthorized access to the system. +- Enables users to perform actions they should not be able to. +- Allows users to deny actions they have performed. --- @@ -35,7 +46,7 @@ Actions that differ from Wasm rules (like calculating wrong values) are not seen By default, native APIs and CLIs are following the principle of **caller guarantee**. If the caller provides incorrect parameters or users input malformed options, it is not a security issue. For example, if a user passes an invalid file descriptor to `fd_read`, it is not a security issue. -.wasm are not trusted. Malformed .wasm files should be handled gracefully. If a .wasm file causes a runtime crash or hang, it is a security issue. On the other hand, it's expected that aot runtime alone doesn't provide the same guarantee. So user-crafted .aot can cause anything, including crashes or hangs. They are not considered security issues. +WebAssembly binaries are not trusted. Malformed .wasm files should be handled gracefully. If a .wasm file causes a runtime crash or hang, it is a security issue. On the other hand, it's expected that aot runtime alone doesn't provide the same guarantee. So user-crafted .aot can cause anything, including crashes or hangs. They are not considered security issues. A denial-of-service (DoS) attack is a cyberattack that aims to make a computer or network resource unavailable to its users. If the service (runtime in this case) can recover and start another module or run another function within the same instance, it is not considered unavailable, and thus not a Denial of Service (DoS). From 3f1e29a115cebb59b56a00479194c223bc683a04 Mon Sep 17 00:00:00 2001 From: Stephen Berard <581348+srberard@users.noreply.github.com> Date: Tue, 31 Mar 2026 11:26:11 +0200 Subject: [PATCH 2/4] Update doc/security_need_to_know.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- doc/security_need_to_know.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/security_need_to_know.md b/doc/security_need_to_know.md index c870453bc9..90abf130b1 100644 --- a/doc/security_need_to_know.md +++ b/doc/security_need_to_know.md @@ -14,9 +14,9 @@ It is commonly stated that a security issue is an issue that: Given that WASI is a set of Capability-based APIs, all unauthorized actions are not supposed to happen. Most of the above security concerns can be alleviated. What remains for us is to ensure that the execution of Wasm modules is secure. In other words, do not compromise the sandbox. Unless it is explicitly disabled beforehand. -WebAssembly binaries are considered untrusted. A Wasm binary that causes a breach of the Wasm sandbox or a crash of the runtime is considered to be a potential security issue. On the other hand, Ahead-of-Time (AoT) binaries are assumed to be generated by a trusted source and using the supported toolchain. Therefore, AoT binaries are considered trusted. As such, malformed or manipulated AoT binaries that breach the sandbox or cash crashes may be considered as bugs but are not classified as security issues. +WebAssembly binaries are considered untrusted. A Wasm binary that causes a breach of the Wasm sandbox or a crash of the runtime is considered to be a potential security issue. On the other hand, Ahead-of-Time (AoT) binaries are assumed to be generated by a trusted source and using the supported toolchain. Therefore, AoT binaries are considered trusted. As such, malformed or manipulated AoT binaries that breach the sandbox or cause crashes of the runtime may be considered as bugs but are not classified as security issues. -If the AoT compiler and/or related tools emit an AoT binary that causes a breach of the Wasm sandbox or a crash is considered a potential security issue. It is assumed that the correct configuration and options are used when generating AoT binaries. Misconfiguration or misuse of the tooling options, therefore, are not considered to be security issues. +If the AoT compiler and/or related tools emit an AoT binary that breaches the Wasm sandbox or causes the runtime to crash, this indicates a potential security issue in the AoT toolchain. It is assumed that the correct configuration and options are used when generating AoT binaries. Misconfiguration or misuse of the tooling options, therefore, is not considered to be a security issue. ### Is this bug considered a security vulnerability? From e47af1f3bf045d6dab60408cbaad06e192269443 Mon Sep 17 00:00:00 2001 From: Stephen Berard <581348+srberard@users.noreply.github.com> Date: Tue, 31 Mar 2026 11:26:25 +0200 Subject: [PATCH 3/4] Update doc/security_need_to_know.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- doc/security_need_to_know.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/doc/security_need_to_know.md b/doc/security_need_to_know.md index 90abf130b1..89017f2de6 100644 --- a/doc/security_need_to_know.md +++ b/doc/security_need_to_know.md @@ -26,13 +26,13 @@ if a bug **results in crash or hang**, please treat it as a security problem and If the author of an issue(results in crash or hang) can go through the checklist below and answer all questions with "No", it is fine to mark it as a regular bug. If not, please report it as a security issue. -Does the -- Exposes sensitive information to unauthorized parties. -- Allows unauthorized modification of data or system state. -- Affects the availability of the system or its services. -- Permits unauthorized access to the system. -- Enables users to perform actions they should not be able to. -- Allows users to deny actions they have performed. +Does the issue: +- expose sensitive information to unauthorized parties? +- allow unauthorized modification of data or system state? +- affect the availability of the system or its services? +- permit unauthorized access to the system? +- enable users to perform actions they should not be able to? +- allow users to deny actions they have performed? --- From f05a8b831fc06c05bba5759ef9f737058f7fea63 Mon Sep 17 00:00:00 2001 From: Stephen Berard Date: Tue, 31 Mar 2026 11:45:38 +0200 Subject: [PATCH 4/4] Refined guidance around what is a security issue Signed-off-by: Stephen Berard --- doc/security_need_to_know.md | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/doc/security_need_to_know.md b/doc/security_need_to_know.md index 89017f2de6..e9bc890396 100644 --- a/doc/security_need_to_know.md +++ b/doc/security_need_to_know.md @@ -21,18 +21,16 @@ If the AoT compiler and/or related tools emit an AoT binary that breaches the Wa ### Is this bug considered a security vulnerability? #### For someone who finds a problem +If a bug **causes a crash or hang**, treat it as a possible security issue and report it to a security advisor. A maintainer will review it and change its category if needed. When in doubt, report it as a security issue. -if a bug **results in crash or hang**, please treat it as a security problem and report it to a security advisor. The maintainer will look into it and change its category if needed. It is better safe than sorry. +If the person reporting the issue can answer "Yes" to any question in the checklist below, report it as a security issue. Otherwise, the issue can be treated as a regular bug. -If the author of an issue(results in crash or hang) can go through the checklist below and answer all questions with "No", it is fine to mark it as a regular bug. If not, please report it as a security issue. - -Does the issue: -- expose sensitive information to unauthorized parties? -- allow unauthorized modification of data or system state? -- affect the availability of the system or its services? -- permit unauthorized access to the system? -- enable users to perform actions they should not be able to? -- allow users to deny actions they have performed? +Does the issue allow an WebAssembly binary to: +- break out of the Wasm sandbox? +- read or modify host memory, runtime memory, or another module's data when it should not? +- use files, sockets, device access, or other host resources without being the granted capabilities? +- call host functions or native APIs in a way that bypasses intended checks? +- make the runtime unavailable or put it into an unrecoverable state? ---