CVE-2026-58592 Overview
CVE-2026-58592 is a memory-safety vulnerability in the Ladybird web browser affecting its WebAssembly ECMAScript Module (ESM) integration loader. The flaw resides in WebAssemblyModule.cpp, where a stack-local Wasm::FunctionType is passed by reference to create_host_function. The host callback retains that reference beyond the function's lifetime, producing a dangling reference. Attackers can leverage stale result-type data to force an empty result vector for a statically non-empty return type. The residual attacker-influenced register value flows into the WebAssembly garbage-collection array.set handler, which bit-casts it into an ArrayInstance pointer, yielding an arbitrary write.
Critical Impact
A malicious web page can chain the dangling reference into arbitrary code execution inside the Ladybird WebContent process without instrumentation or source modification.
Affected Products
- Ladybird web browser (WebAssembly ESM-integration module loader)
- Libraries/LibWeb/WebAssembly/WebAssemblyModule.cpp component
- Builds using the ESM import path for WebAssembly modules
Discovery Timeline
- 2026-07-01 - CVE-2026-58592 published to NVD
- 2026-07-02 - Last updated in NVD database
Technical Details for CVE-2026-58592
Vulnerability Analysis
The defect is an out-of-bounds write rooted in a lifetime error [CWE-787]. When a JavaScript function is imported into a WebAssembly module through the ESM integration path, WebAssemblyModule.cpp constructs a Wasm::FunctionType on the stack. The code then passes that value by reference into create_host_function. The host callback captures the reference and dereferences it after the ESM link-loop iteration returns. The standard instantiate path uses a long-lived reference and is therefore unaffected.
After the stack frame unwinds, the FunctionType object is destroyed. Subsequent invocations of the host callback read stale result-type metadata. The callback returns an empty result vector even when the static signature declares a non-empty return. The destination register keeps its previous attacker-influenced value. That value is then consumed by the WebAssembly-GC array.set handler, which performs only a null check before bit-casting the low bits of the reference into an ArrayInstance pointer. This grants an arbitrary write primitive reachable from HTML content.
Root Cause
The root cause is a dangling reference to a stack-allocated Wasm::FunctionType combined with insufficient validation in the WASM-GC array.set reference handler. The handler trusts the low bits of the reference as a valid ArrayInstance pointer after a single null check.
Attack Vector
An attacker hosts a crafted HTML page that imports a JavaScript function into a WebAssembly module through the ESM integration path. User interaction is required to visit the page. Once the module links, the attacker triggers the host callback to produce a mismatched result vector and drives the array.set handler to perform an arbitrary write, leading to code execution in the WebContent process.
A reachability proof-of-concept is published in the exploitarium repository. See the VulnCheck Security Advisory for the full technical write-up.
Detection Methods for CVE-2026-58592
Indicators of Compromise
- Unexpected child processes spawned by the Ladybird WebContent renderer process.
- Crashes or abnormal terminations in WebContent referencing WebAssemblyModule.cpp or Wasm::FunctionType.
- HTML pages that combine ESM import statements with .wasm modules using imported JavaScript host functions.
Detection Strategies
- Inspect network traffic and web proxy logs for delivery of WebAssembly modules paired with ESM integration scripts from untrusted origins.
- Monitor endpoints running Ladybird for renderer process crashes and memory-corruption signatures tied to WebAssembly execution.
- Hunt for outbound connections initiated by the WebContent process to attacker-controlled infrastructure after web browsing activity.
Monitoring Recommendations
- Enable verbose logging on browser telemetry to capture WebAssembly instantiation events through the ESM path.
- Alert on process-lineage anomalies where Ladybird renderer processes execute shells, scripting hosts, or download utilities.
- Correlate browser crash telemetry with recent visits to previously unseen domains hosting .wasm payloads.
How to Mitigate CVE-2026-58592
Immediate Actions Required
- Update Ladybird to a build that replaces the stack-local Wasm::FunctionType with a long-lived allocation in the ESM integration path.
- Restrict usage of Ladybird for browsing untrusted content until a patched build is deployed.
- Review the upstream WebAssemblyModule.cpp source for the current state of the fix before rolling out builds.
Patch Information
At the time of publication, no fixed version identifier is listed in the NVD entry for CVE-2026-58592. Track the Ladybird upstream repository and the VulnCheck advisory for the commit that removes the dangling reference and hardens the WASM-GC array.set reference handler.
Workarounds
- Disable WebAssembly execution in Ladybird where a configuration flag is available in your build.
- Block loading of .wasm MIME types (application/wasm) at the enterprise web proxy for high-risk user groups.
- Enforce browser usage policies that prevent Ladybird from rendering arbitrary internet content on sensitive hosts.
# Example proxy rule to block WebAssembly delivery
# Squid ACL example
acl wasm_content rep_mime_type application/wasm
http_reply_access deny wasm_content
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

