Skip to content

frame_offset_bottom array bounds overflow in fast Interpreter mode when handling GET_GLOBAL(I32) followed by if opcode

Moderate
lum1n0us published GHSA-gvx3-gg3x-rjcx Nov 25, 2025

Package

No package listed

Affected versions

2.4.2

Patched versions

None

Description

Summary

An out-of-bounds array access issue exists in WAMR's fast interpreter mode during WASM bytecode loading. When frame_ref_bottom and frame_offset_bottom arrays are at capacity and a GET_GLOBAL(I32) opcode is encountered, frame_ref_bottom is expanded but frame_offset_bottom may not be. If this is immediately followed by an if opcode that triggers preserve_local_for_block, the function traverses arrays using stack_cell_num as the upper bound, causing out-of-bounds access to frame_offset_bottom since it wasn't expanded to match the increased stack_cell_num.

Details

  1. Problematic Sequence
    When GET_GLOBAL(I32) is processed, increases stack_cell_num by 1 and may expand frame_ref_bottom array, For I32 (32-bit type), it may early return without additional expansion checks. If frame_offset_bottom is not at boundary yet, no expansion occurs despite stack_cell_num being increased

  2. Out-of-Bounds Access
    When if opcode is encountered next, it calls PRESERVE_LOCAL_FOR_BLOCK, which iterates through stack_cell_num for frame_offset_bottom which may be out of bounds.

PoC

To reproduce the vulnerability:

  1. Enable fast interpreter mode
  2. Load a WASM module with a function containing:
    • Multiple operations that fill frame_ref and frame_offset arrays close to capacity
    • A GET_GLOBAL opcode accessing an I32 global variable (when arrays are at/near capacity)
    • Immediately followed by an IF opcode

Impact

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Local
Attack complexity
High
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H

CVE ID

CVE-2025-64713

Weaknesses

No CWEs

Credits