CVE-2026-58592 Details
Description
Ladybird before commit 2f9dc7e contains a dangling-reference memory-safety flaw in its WebAssembly ESM-integration module loader. When a JavaScript function is imported into a WebAssembly module via the ESM path, WebAssemblyModule.cpp passes a stack-local Wasm::FunctionType by reference to create_host_function, whose host callback captures and later reads that reference; once the ESM link-loop iteration ends the FunctionType is destroyed, leaving the callback with a dangling reference (the normal instantiate path uses a long-lived reference and is not affected). Stale result-type data lets the host callback return an empty result vector for a statically non-empty result, so the destination register retains an attacker-influenced value that is then consumed by the WASM-GC array.set handler, which bit-casts the reference low bits to an ArrayInstance pointer after only a null check, yielding an arbitrary write. A web page can chain this into code execution in the WebContent process. Verified reachable from HTML content without any instrumentation or source modification.
A memory-safety vulnerability has been identified in Ladybird's WebAssembly ECMAScript Module (ESM) integration. This flaw arises from a dangling reference created when a JavaScript function is imported into a WebAssembly module via the ESM path. The WebAssembly module loader passes a stack-local Wasm::FunctionType by reference to a host function callback, which captures and later accesses that reference. Once the ESM linking process concludes, the FunctionType is destroyed, leaving the callback with a dangling reference. This issue is not present in the standard instantiation path, which uses a long-lived reference. Exploitation of this vulnerability is made possible by stale result-type data, which allows the host callback to return an empty result vector for a statically non-empty result. Consequently, the destination register retains an attacker-influenced value, which is then processed by the WebAssembly garbage-collected array set handler. This handler bit-casts the reference's low bits to an ArrayInstance pointer, after only a null check, resulting in an arbitrary write. The vulnerability can be exploited through a web page, leading to code execution in the WebContent process.
The host function callback should be modified to own the Wasm::FunctionType it utilizes, either by capturing a stable copy or managing the reference in a way that prevents it from becoming dangling. Additionally, the WebAssembly interpreter should validate the arity of host function results against the expected static types before resuming bytecode execution.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Jul 1, 2026CISA-ADP
Assessed Jul 2, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-787 | Out-of-bounds Write | [email protected] |
| CWE-825 | Expired Pointer Dereference | [email protected] |
| CWE-843 | Access of Resource Using Incompatible Type ('Type Confusion') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| Ladybird | <= 0 |
CPE
Remediation
| |
Change History
3 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Sep 11, 2026 | CVE Modified | [email protected] |
| Jul 2, 2026 | CVE Modified | CISA-ADP |
| Jul 1, 2026 | New CVE Received | [email protected] |
Volerion