Junglewise Threat Intelligence

CVE-2026-49263: Capstone WASM br_table instruction-size truncation

CVE-2026-49263 · Severity: info · Published 2026-08-14

Technologies: Capstone.

Executive brief

Capstone is a disassembly framework used by reverse engineers and security tools to analyze executable code. A flaw in its WebAssembly support causes certain malformed instructions to be parsed incorrectly, leading to infinite loops during disassembly or skipped instruction data. An attacker supplying specially crafted WASM bytecode could cause the disassembler to hang indefinitely or misinterpret subsequent code, disrupting analysis workflows or security scanning.

Technical details

The vulnerability is an integer truncation bug in Capstone's WASM decoder's `br_table` instruction handler. The decoder accumulates instruction size in a 32-bit local variable but assigns it to a 16-bit output parameter without bounds checking. When a `br_table` instruction is exactly 65,536 bytes long, the size wraps to zero in the `uint16_t` field; larger instructions wrap to non-zero incorrect values. This causes `cs_disasm()` with unbounded count to loop indefinitely on the same instruction without advancing the buffer, or `cs_disasm_iter()` to skip into the middle of instruction payloads and decode garbage as subsequent instructions. The root cause is in `WASMDisassembler.c:601-610` where `*param_size = tmp_len + var_len` lacks overflow protection. No user interaction or authentication is required; any code that passes untrusted WASM bytecode to the disassembly APIs is affected. Version 6.0.0-Alpha9 patches the issue.

Affected products

  • Capstone Capstone prior to 6.0.0-Alpha9

Timeline

  • 2026-05-27: disclosed
  • 2026-05-27: patched

References