Summary
A critical input-validation flaw in Wasmtime's component-model async callback handling can allow a malicious WebAssembly component to cause an approximately 16 KB write to the native stack.
Under affected configurations, this may corrupt return addresses, crash the host process, or enable escape from the WebAssembly sandbox.
A critical input-validation flaw in Wasmtime's component-model async callback handling can allow a malicious WebAssembly component to cause an approximately 16 KB write to the native stack.
Under affected configurations, this may corrupt return addresses, crash the host process, or enable escape from the WebAssembly sandbox.
Affected context
The vulnerability occurs in Wasmtime environments that process component-model async callbacks and accept callback result types without sufficiently validating their conformity to expected definitions. It is relevant when an untrusted or malicious WebAssembly component can be instantiated by a host using affected Wasmtime releases.
The vulnerability occurs in Wasmtime environments that process component-model async callbacks and accept callback result types without sufficiently validating their conformity to expected definitions. It is relevant when an untrusted or malicious WebAssembly component can be instantiated by a host using affected Wasmtime releases.
Exploit preconditions
- Attack surface: Wasmtime's component-model async callback interface
- Required access: Ability to supply or cause the host to load a malicious WebAssembly component
- Trigger point: Processing an async callback with a mistyped or unexpected result type
- Why exploitation is possible: Insufficient validation permits inconsistent type information to reach native stack-handling logic, enabling an out-of-bounds stack write
- Attack surface: Wasmtime's component-model async callback interface
- Required access: Ability to supply or cause the host to load a malicious WebAssembly component
- Trigger point: Processing an async callback with a mistyped or unexpected result type
- Why exploitation is possible: Insufficient validation permits inconsistent type information to reach native stack-handling logic, enabling an out-of-bounds stack write
Why this happens
The underlying bug is inadequate validation of component-model async callback result types before they are used by native runtime code. When attacker-controlled type information is accepted as though it matched the expected callback contract, internal stack operations can allocate or copy data using incorrect assumptions.
This behavior maps to CWE-20: Improper Input Validation. The validation boundary fails to reject malformed or inconsistent component inputs before they influence memory-sensitive native operations, creating conditions for stack corruption.
The underlying bug is inadequate validation of component-model async callback result types before they are used by native runtime code. When attacker-controlled type information is accepted as though it matched the expected callback contract, internal stack operations can allocate or copy data using incorrect assumptions.
This behavior maps to CWE-20: Improper Input Validation. The validation boundary fails to reject malformed or inconsistent component inputs before they influence memory-sensitive native operations, creating conditions for stack corruption.
Potential impact
- The Wasmtime host process may crash
- Native stack data, including return addresses, may be corrupted
- A malicious component could potentially escape the WebAssembly sandbox
- Host confidentiality, integrity, or availability could be affected
- A compromised host process could enable broader system or service impact
- The Wasmtime host process may crash
- Native stack data, including return addresses, may be corrupted
- A malicious component could potentially escape the WebAssembly sandbox
- Host confidentiality, integrity, or availability could be affected
- A compromised host process could enable broader system or service impact
General mitigation guidance
Mitigation generally focuses on rejecting malformed component interfaces before they reach memory-sensitive runtime paths and reducing the privileges available to Wasmtime hosts.
Common defensive patterns include:
- Enforcing strict validation of component-model types and async callback signatures
- Treating WebAssembly components as untrusted input by default
- Using secure-by-default runtime configuration that limits host capabilities
- Running Wasmtime workloads with least-privilege operating-system and container permissions
- Separating untrusted components from sensitive host processes and resources
- Applying resource, process, and filesystem isolation to reduce the consequences of a runtime failure
Mitigation generally focuses on rejecting malformed component interfaces before they reach memory-sensitive runtime paths and reducing the privileges available to Wasmtime hosts.
Common defensive patterns include:
- Enforcing strict validation of component-model types and async callback signatures
- Treating WebAssembly components as untrusted input by default
- Using secure-by-default runtime configuration that limits host capabilities
- Running Wasmtime workloads with least-privilege operating-system and container permissions
- Separating untrusted components from sensitive host processes and resources
- Applying resource, process, and filesystem isolation to reduce the consequences of a runtime failure
How teams detect issues like this
Organizations can look for this class of issue through:
- Static analysis and code review of native paths that consume externally supplied type metadata
- Review signals involving unchecked callback signatures, unsafe casts, and size calculations derived from component input
- Tests that exercise malformed, mismatched, and boundary-case component-model async interfaces
- Policy enforcement requiring validation of untrusted components before execution
- Runtime monitoring for unexpected Wasmtime crashes, repeated component-instantiation failures, or sandbox policy violations
Automated security and fuzzing tools can help identify inconsistent type handling and memory-safety failures in parser and callback implementations.
Organizations can look for this class of issue through:
- Static analysis and code review of native paths that consume externally supplied type metadata
- Review signals involving unchecked callback signatures, unsafe casts, and size calculations derived from component input
- Tests that exercise malformed, mismatched, and boundary-case component-model async interfaces
- Policy enforcement requiring validation of untrusted components before execution
- Runtime monitoring for unexpected Wasmtime crashes, repeated component-instantiation failures, or sandbox policy violations
Automated security and fuzzing tools can help identify inconsistent type handling and memory-safety failures in parser and callback implementations.

