CVE-2025-2368 Overview
CVE-2025-2368 is a heap-based buffer overflow in the WebAssembly Binary Toolkit (wabt) version 1.0.36. The flaw resides in the wabt::interp::BinaryReaderInterp::OnExport function within wabt/src/interp/binary-reader-interp.cc, part of the Malformed File Handler component. An attacker can trigger the overflow by supplying a crafted WebAssembly binary to the interpreter. The exploit details have been publicly disclosed, increasing the risk of opportunistic abuse against developer tooling and CI pipelines that process untrusted .wasm files.
Critical Impact
Processing a malformed WebAssembly module in wabt 1.0.36 can corrupt heap memory in the interpreter, leading to crashes or potential out-of-bounds writes [CWE-119, CWE-787].
Affected Products
- WebAssembly Binary Toolkit (wabt) version 1.0.36
- The wabt-interp interpreter component (binary-reader-interp.cc)
- Downstream tooling and CI pipelines bundling wabt 1.0.36 for .wasm parsing
Discovery Timeline
- 2025-03-17 - CVE-2025-2368 published to NVD
- 2026-01-06 - Last updated in NVD database
Technical Details for CVE-2025-2368
Vulnerability Analysis
The vulnerability is a heap-based buffer overflow [CWE-122] within the WebAssembly interpreter shipped with wabt. Specifically, the BinaryReaderInterp::OnExport handler fails to validate fields in the export section of a WebAssembly module before writing into a heap-allocated structure. Attackers can craft a .wasm file with malformed export entries that drive the parser into an out-of-bounds write [CWE-787].
Exploitation requires user interaction, as a target must load the malicious module into a wabt-based tool such as wasm-interp or wasm-validate. The attack vector is network-reachable because WebAssembly modules are frequently distributed through web channels, package registries, and shared developer artifacts. Successful exploitation can corrupt adjacent heap metadata, crash the process, or, in chained scenarios, influence control flow.
The issue is documented in upstream GitHub issues #2537 and #2556, with a fix proposed in pull request #2541.
Root Cause
The root cause is missing bounds validation when OnExport processes export entries from an untrusted binary. The function consumes attacker-controlled length and index fields without enforcing that they remain within the bounds of the underlying buffer or module tables. Writes derived from those fields land outside the intended allocation, producing a heap overflow.
Attack Vector
An attacker delivers a malformed WebAssembly module to a victim running a vulnerable wabt 1.0.36 binary. Common delivery channels include malicious npm or registry artifacts referencing wasm-interp, CI jobs that ingest third-party .wasm files, and developer workstations validating untrusted modules. No authentication is required, but the victim must execute a wabt tool against the attacker-supplied file.
No verified public proof-of-concept code is available. See the upstream issue WebAssembly/wabt#2556 for technical reproduction details.
Detection Methods for CVE-2025-2368
Indicators of Compromise
- Unexpected crashes, SIGABRT, or AddressSanitizer heap-buffer-overflow reports from wasm-interp, wasm-validate, or other wabt 1.0.36 binaries.
- Presence of unsigned or unverified .wasm files in build pipelines, developer workstations, or shared artifact stores.
- Process invocations of wabt tools against files sourced from external URLs, untrusted email attachments, or unvetted package dependencies.
Detection Strategies
- Inventory binaries linking against libwabt or shipping wabt 1.0.36 across developer endpoints and CI runners, and flag any matching version.
- Hunt for child processes named wasm-interp, wasm-validate, wasm2wat, or wat2wasm spawned by browsers, mail clients, or download utilities.
- Correlate crash telemetry from build agents with file ingestion events involving .wasm artifacts to surface exploit attempts.
Monitoring Recommendations
- Enable AddressSanitizer or equivalent runtime memory checks in CI environments that parse untrusted WebAssembly modules.
- Forward process and crash telemetry from developer endpoints and build agents into a centralized SIEM for retrospective hunting.
- Track downloads of .wasm files into engineering environments and alert on execution by wabt tooling within a short window.
How to Mitigate CVE-2025-2368
Immediate Actions Required
- Identify all systems running wabt 1.0.36, including container images, CI runners, and developer workstations.
- Restrict wabt tooling so it only processes .wasm files from trusted, signed sources until patched builds are deployed.
- Isolate WebAssembly parsing in sandboxed containers or low-privilege accounts to limit the blast radius of a successful overflow.
Patch Information
A fix has been proposed upstream in WebAssembly/wabt pull request #2541. Administrators should upgrade to a wabt release that includes this patch or build from the latest main branch once the fix is merged. Rebuild any downstream packages, container images, and language bindings that statically link libwabt to inherit the corrected BinaryReaderInterp::OnExport handling.
Workarounds
- Avoid running wabt 1.0.36 against any .wasm file that has not been produced by a trusted toolchain.
- Execute wabt tools inside containers with read-only mounts, seccomp filters, and restricted memory limits to contain potential exploitation.
- Pin CI pipelines to a non-vulnerable wabt build or temporarily substitute alternative validators until the patched version is adopted.
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

