CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-34943

CVE-2026-34943: Host-Side Panic and Denial of Service in Wasmtime Dynamic Lifting

Alon Barad
Alon Barad
Software Engineer

Apr 10, 2026·9 min read·27 visits

Executive Summary (TL;DR)

A missing bitmasking step in Wasmtime's dynamic lifter allows malicious WebAssembly guests to crash the host runtime by returning extraneous bits in a flags type, causing a Rust panic.

Wasmtime is vulnerable to a denial-of-service condition due to a host-side panic triggered when dynamically lifting WebAssembly Component Model flags types. The dynamic lifter fails to ignore undefined bits provided by a guest, leading to an unhandled exception.

Vulnerability Overview

Wasmtime operates as a standalone runtime for WebAssembly, frequently utilized in environments requiring secure sandboxing for untrusted code execution. The runtime supports the WebAssembly Component Model, which defines a standard mechanism for inter-component communication through complex data types. Among these types is the flags type, a bitmask mapping specific bits to named boolean states defined in a WebAssembly Interface Type (WIT) interface.

When bridging high-level languages with the WebAssembly environment, Wasmtime must "lift" raw bytes returned by guest memory into host-native structures. The runtime provides two primary mechanisms for this integration: static bindings generated via the bindgen! macro, and dynamic runtime evaluation via the wasmtime::component::Val API. The dynamic API permits generic host interactions without compile-time knowledge of the guest interface.

A flaw exists in the dynamic Val API where the lifter fails to correctly enforce the bounds of the flags type. The WebAssembly Component Model Canonical ABI dictates that when a guest returns a bitmask for a flags type, any bits set that do not correspond to defined flags must be silently ignored. The dynamic lifter implementation in Wasmtime omitted this masking step, validating every set bit against the interface definition.

Because the host-side logic assumed the bitmask only contained valid offsets, receiving an extraneous bit causes the internal pointer logic to map beyond the length of the defined names array. In Rust, an out-of-bounds array access results in an immediate, unrecoverable panic. This mechanism allows a malicious WebAssembly guest to terminate the entire host process, resulting in a localized denial-of-service condition.

Root Cause Analysis

The vulnerability represents a failure to conform to the WebAssembly Component Model Canonical ABI specification regarding type lifting constraints. The canonical ABI explicitly mandates that extraneous high-order bits present in integer representations of flags types must be discarded prior to interpretation. This ensures forward compatibility and prevents unexpected behavior when interfacing with components compiled against newer ABI versions that may define additional flags.

In Wasmtime's source, dynamic lifting operations are processed through crates/wasmtime/src/runtime/component/values.rs. When reconstructing a Val::Flags object from a returned guest integer, the internal function push_flags iterates over the set bits. The function operates a while loop that shifts the bitfield and increments an offset counter, appending the corresponding flag string from ty.names for every set bit.

The logic incorrectly assumed the maximum bit index present in the integer would never exceed ty.names.len() - 1. Because there was no explicit bitmask applied to the raw integer before the loop, a guest could manually manipulate the bitfield to include set bits at arbitrary offsets. When the loop encountered a set bit at an index greater than or equal to ty.names.len(), the statement ty.names[offset as usize] triggered a runtime boundary violation.

This flaw strictly manifests within the dynamic evaluation context. Statically generated host bindings produced by the bindgen! macro inherently execute bitmasking by mapping the known valid fields at compile time. Thus, the static bindings discard out-of-bounds bits before they can be evaluated, neutralizing the panic condition completely in structurally bound host applications.

Code Analysis

To understand the vulnerability mechanics, we must review the implementation of the push_flags function in crates/wasmtime/src/runtime/component/values.rs before the patch was applied. The function receives the target TypeFlags structure, a mutable reference to the flags vector being populated, a starting offset, and the raw bits extracted from the guest component.

// Vulnerable code in values.rs
fn push_flags(ty: &TypeFlags, flags: &mut Vec<String>, mut offset: u32, mut bits: u32) {
    while bits > 0 {
        if bits & 1 != 0 {
            flags.push(ty.names[offset as usize].clone());
        }
        offset += 1;
        bits >>= 1;
    }
}

In the vulnerable implementation, the while loop continues as long as bits > 0. If a guest intentionally sets the 31st bit (i.e., 1 << 31) for a flag type that only defines two names, the loop executes 32 times. On the 32nd iteration, offset equals 31. The access to ty.names[31] forces an out-of-bounds read because ty.names only contains two elements, triggering a panic.

The maintainers resolved this issue by injecting an explicit bounds check into the loop condition. The patched code requires that the iteration only proceeds if the current offset is within the valid length of the defined flag names.

// Patched code in values.rs
fn push_flags(ty: &TypeFlags, flags: &mut Vec<String>, mut offset: u32, mut bits: u32) {
    while bits > 0 && usize::try_from(offset).unwrap() < ty.names.len() {
        if bits & 1 != 0 {
            flags.push(ty.names[offset as usize].clone());
        }
        offset += 1;
        bits >>= 1;
    }
}

By appending && usize::try_from(offset).unwrap() < ty.names.len() to the loop condition, the function halts processing as soon as it reaches the end of the defined flags. Any remaining high-order bits in the bits integer are subsequently discarded. This aligns the dynamic lifter's behavior with the Canonical ABI requirements and eliminates the panic vector.

Exploitation Methodology

Exploitation of CVE-2026-34943 requires the attacker to supply and execute a malicious WebAssembly module within a vulnerable Wasmtime host environment. The host application must explicitly utilize the dynamic Val API to execute functions exported by the guest module. The attacker does not require direct memory access or prior authentication; the capability to upload and instantiate the WebAssembly module is sufficient to trigger the condition.

The attack methodology involves crafting a WebAssembly component that exports a function returning a flags type. The module is constructed using WebAssembly text format (WAT) or compiled from a high-level language, manipulating the return instruction to yield an integer containing high-order bits that fall outside the bounds of the defined interface. The following Mermaid diagram illustrates the execution flow during an exploitation attempt.

A proof-of-concept demonstration provided in the vendor's repository (tests/all/component_model/dynamic.rs) illustrates the necessary configuration. The test case instantiates a component with a flags type containing exactly two valid fields: "a" and "b".

// Proof of Concept snippet
let component = Component::new(
    &engine,
    r#"
        (component
            (type $f' (flags "a" "b"))
            (export $f "f" (type $f'))
            (core module $m
                (func (export "r") (param i32) (result i32) local.get 0)
            )
            (core instance $i (instantiate $m))
            (func (export "run") (param "x" u32) (result $f)
                (canon lift (core func $i "r")))
        )
    "#,
)?;
 
// Attacker provides integer 4 (binary 100)
// Bit index 2 is set, but only indices 0 and 1 are valid.
run.call(&mut store, &[Val::U32(4)], &mut output)?;

When the attacker invokes the exported function via the dynamic API with the input u32(4), the guest returns the integer unmodified. The binary representation 100 indicates that the bit at index 2 is active. Because the type only defines flags at indices 0 and 1, the dynamic lifter reaches the third iteration of the push_flags loop and attempts to read the non-existent third element from the type definition, causing an immediate crash.

Impact Assessment

The impact of CVE-2026-34943 is isolated to availability, resulting in a denial-of-service condition. Successful exploitation induces a Rust panic that terminates the host process invoking the Wasmtime runtime engine. Confidentiality and integrity remain unaffected; the out-of-bounds array read generates an immediate exception rather than permitting arbitrary memory leakage or remote code execution.

The vulnerability is scored as a 5.6 (Medium) on the CVSS 4.0 scale (CVSS:4.0/AV:N/AC:H/AT:P/PR:H/UI:A/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N). The "High" rating for Attack Complexity reflects the necessity for the host environment to specifically implement the dynamic Val API. Furthermore, the "High" Privileges Required metric indicates that the attacker must possess the authorization necessary to upload and execute a custom WebAssembly component within the target environment.

The risk is most pronounced in multi-tenant environments where a centralized Wasmtime host engine evaluates dynamic modules provided by various independent users. In such architectures, a single malicious module can intentionally panic the shared host runtime, abruptly halting execution for all concurrent components and causing significant operational disruption.

Conversely, systems reliant exclusively on static bindings via the bindgen! macro are immune to this attack vector. The statically generated host code correctly masks the returned integer at the interface boundary before attempting to map flags, discarding the extraneous bits automatically. Deployments conforming to static typing principles do not expose the vulnerable push_flags code path.

Remediation and Mitigation

The primary remediation strategy requires upgrading the Wasmtime runtime to a patched version. The maintainers of the Bytecode Alliance released fixes across several supported release branches. System administrators and developers must update their dependencies to Wasmtime versions 24.0.7, 36.0.7, 42.0.2, or 43.0.1 depending on their current integration lifecycle.

For environments unable to immediately deploy patched runtime binaries, migrating host integrations from the dynamic Val API to statically generated bindings provides a complete mitigation. By refactoring the integration logic to utilize the bindgen! macro, the host application will automatically apply the necessary bitmasking dictated by the Canonical ABI during the compilation phase, bypassing the vulnerable dynamic parsing logic.

If transitioning to static bindings is architecturally infeasible and immediate patching is impossible, operators should implement stringent validation on the origin of WebAssembly modules. Restricting component upload capabilities to trusted entities reduces the likelihood of malicious exploitation. However, this approach relies on administrative controls rather than technical prevention and is not a definitive fix.

Following the application of the patched versions, organizations should verify the integrity of their runtime environments by deploying the proof-of-concept code within an isolated test harness. A successful patch application will result in the push_flags loop gracefully ignoring the out-of-bounds bits, allowing the host process to continue execution without panicking.

Official Patches

bytecodeallianceOfficial Security Advisory and Patch Information

Technical Appendix

CVSS Score
5.6/ 10
CVSS:4.0/AV:N/AC:H/AT:P/PR:H/UI:A/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N

Affected Systems

Wasmtime WebAssembly Runtime Engine (Dynamic Val API deployments)Host applications utilizing Wasmtime's wasmtime::component::Val for component model integration

Affected Versions Detail

Product
Affected Versions
Fixed Version
Wasmtime
bytecodealliance
< 24.0.724.0.7
Wasmtime
bytecodealliance
>= 25.0.0, < 36.0.736.0.7
Wasmtime
bytecodealliance
>= 37.0.0, < 42.0.242.0.2
Wasmtime
bytecodealliance
>= 43.0.0, < 44.0.143.0.1
AttributeDetail
CWE IDCWE-248 (Uncaught Exception)
Attack VectorNetwork (Requires Module Upload/Execution Privileges)
CVSS 4.0 Score5.6 (Medium)
ImpactDenial of Service (Host Process Panic)
Exploit StatusProof of Concept Available
KEV StatusNot Listed

MITRE ATT&CK Mapping

T1499Endpoint Denial of Service
Impact
CWE-248
Uncaught Exception

An exception is thrown from a function, but it is not caught, causing the program to crash.

Vulnerability Timeline

Vulnerability disclosed and patched in Wasmtime Security Advisories
2026-04-09
CVE-2026-34943 published
2026-04-09
Fixed versions released (24.0.7, 36.0.7, 42.0.2, 43.0.1)
2026-04-09

References & Sources

  • [1]GHSA-m758-wjhj-p3jq: Wasmtime Security Advisory
  • [2]Bytecode Alliance Security Update
  • [3]CVE Record: CVE-2026-34943
  • [4]Red Hat Security Portal: CVE-2026-34943

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•about 17 hours ago•CVE-2026-63462
7.5

CVE-2026-63462: Unauthenticated Stack Overflow Denial of Service in Unleash Server

An unauthenticated remote denial of service vulnerability exists in the Unleash feature management platform. By submitting a crafted JSON payload containing deeply nested structures to an OpenAPI-validated endpoint, an attacker can trigger uncontrolled recursion within the error formatting module. This leads to a call-stack exhaustion (RangeError: Maximum call stack size exceeded) inside the Node.js runtime, causing the service to crash immediately without recovery.

Alon Barad
Alon Barad
8 views•6 min read
•about 18 hours ago•CVE-2026-63004
5.5

CVE-2026-63004: Server-Side Request Forgery in Unleash Addon and Integration Subsystem

CVE-2026-63004 is a server-side request forgery (SSRF) vulnerability in the Unleash feature management platform. Authenticated administrators with CREATE_ADDON or UPDATE_ADDON privileges can exploit this vulnerability to initiate requests to loopback addresses, private networks, and cloud metadata endpoints, potentially leading to information disclosure and credential extraction.

Amit Schendel
Amit Schendel
7 views•8 min read
•about 19 hours ago•CVE-2026-63466
4.1

CVE-2026-63466: Process-Wide Security Degradation via Global Module Mutation in Unleash

Prior to version 8.0.3, Unleash's Markdown event formatter directly mutated the global template-escaping function of the shared mustache Node.js module, resulting in a process-wide security degradation where HTML/Markdown escaping was permanently disabled for the application lifetime.

Alon Barad
Alon Barad
3 views•6 min read
•about 20 hours ago•CVE-2026-76904
9.8

CVE-2026-76904: Unauthenticated SQL Injection in GeoTools PostGIS DataStore Component

A critical SQL injection vulnerability exists in the GeoTools open-source Java library. This vulnerability is situated within the post-processing phase of OGC Filter conversion inside the PostGIS DataStore module. Specifically, the `jsonArrayContains` function does not validate or sanitize its arguments before constructing PostgreSQL SQL/JSON path evaluation queries. An unauthenticated remote attacker can exploit this weakness by submitting crafted filters via standard OGC services like WFS or WMS to execute arbitrary SQL commands on the underlying database system.

Alon Barad
Alon Barad
6 views•5 min read
•about 21 hours ago•CVE-2026-61824
8.2

CVE-2026-61824: High-Severity Cross-Site Scripting (XSS) via Unsanitized Site Extractors in Defuddle

CVE-2026-61824 is a high-severity Cross-Site Scripting (XSS) vulnerability in kepano/defuddle before version 0.19.1. Custom site extractors for platforms such as X/Twitter, Substack, and YouTube constructed HTML representations via template string interpolation without output escaping. This allowed malicious pages to bypass standard parser sanitization routines and execute arbitrary JavaScript.

Amit Schendel
Amit Schendel
5 views•7 min read
•about 22 hours ago•CVE-2026-63421
7.5

CVE-2026-63421: Query Limit Bypass via Negative Integer Input in KeystoneJS core resolvers

A high-severity vulnerability exists in KeystoneJS, a popular Node.js CMS and GraphQL framework, where the query resolution engine fails to validate signed negative integers within the pagination subsystem. Unauthenticated remote attackers can leverage this flaw to bypass the 'graphql.maxTake' safety boundary. By sending large negative values in the 'take' query parameter, the underlying Prisma ORM interprets the value as an instruction to fetch rows from the end of the collection, allowing malicious actors to bypass pagination limits, trigger database resource exhaustion, and execute application-level Denial of Service (DoS) attacks.

Alon Barad
Alon Barad
5 views•6 min read