Description
Capstone is a disassembly framework. In 6.0.0-Alpha9 and earlier, Capstone's arch/SH/SHDisassembler.c SH floating-point decoders such as opFADD, opFMUL, and opFSUB call set_reg() and set_reg_n() using sh_info.op.op_count without checking the fixed-size operands[] array. Repeated crafted instructions processed through cs_disasm_iter() or cs_disasm() with CS_ARCH_SH, CS_MODE_SH2A or CS_MODE_SH4A, CS_MODE_SHFPU, and CS_OPT_DETAIL can increment the operand count beyond the 176-byte sh_info allocation and perform a four-byte heap buffer overflow write. The corruption can crash the process and may enable code execution depending on heap layout. This issue is fixed in version 6.0.0-Alpha10.
Published: 2026-08-20
Score: 7.3 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Capstone’s SH floating‑point decoders invoke set_reg() and set_reg_n() based on an operation count without bounding against the fixed‑size operand array. When a crafted series of SH2A/FPU instructions is parsed with cs_disasm_iter() or cs_disasm(), the operand count can exceed the allocated 176‑byte buffer, causing a four‑byte heap write past the end of the allocation. This corruption can crash the process or, depending on heap layout, may allow an attacker to inject and execute arbitrary code.

Affected Systems

The vulnerability exists in the Capstone disassembly framework provided by Capstone Engine, specifically in version 6.0.0‑Alpha9 and earlier. Any deployment of Capstone that decodes SH architecture instructions with SHFPU support (CS_MODE_SH2A or CS_MODE_SH4A) and enables detailed output (CS_OPT_DETAIL) is affected.

Risk and Exploitability

The CVSS score of 7.3 indicates high severity, while the EPSS score of < 1% suggests a low but non‑zero exploitation probability; the vulnerability is not listed in the CISA KEV catalog. Exploitation requires the ability to supply crafted SH instructions to the disassembler, which typically limits the attack to environments where Capstone processes untrusted machine code. However, if local code execution is possible, the risk is significant due to the potential for arbitrary code execution through the heap overflow.

Generated by OpenCVE AI on August 25, 2026 at 15:40 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade to Capstone Engine version 6.0.0‑Alpha10 or later, which contains the buffer overflow fix.
  • If an upgrade is not immediately possible, configure Capstone to avoid the vulnerable code paths by disabling SHFPU support (CS_MODE_SH2A/CS_MODE_SH4A) or setting CS_OPT_DETAIL to 0 when parsing potentially untrusted SH binary code.
  • Implement strict input validation for any guest SH code passed to Capstone, ensuring that operation counts do not exceed a safe threshold before invoking cs_disasm or cs_disasm_iter.

Generated by OpenCVE AI on August 25, 2026 at 15:40 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Tue, 25 Aug 2026 12:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-805
References
Metrics threat_severity

None

cvssV3_1

{'score': 7.0, 'vector': 'CVSS:3.1/AV:L/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H'}

threat_severity

Moderate


Thu, 20 Aug 2026 23:00:00 +0000

Type Values Removed Values Added
First Time appeared Capstone-engine
Capstone-engine capstone
Vendors & Products Capstone-engine
Capstone-engine capstone

Thu, 20 Aug 2026 21:45:00 +0000

Type Values Removed Values Added
Description Capstone is a disassembly framework. In 6.0.0-Alpha9 and earlier, Capstone's arch/SH/SHDisassembler.c SH floating-point decoders such as opFADD, opFMUL, and opFSUB call set_reg() and set_reg_n() using sh_info.op.op_count without checking the fixed-size operands[] array. Repeated crafted instructions processed through cs_disasm_iter() or cs_disasm() with CS_ARCH_SH, CS_MODE_SH2A or CS_MODE_SH4A, CS_MODE_SHFPU, and CS_OPT_DETAIL can increment the operand count beyond the 176-byte sh_info allocation and perform a four-byte heap buffer overflow write. The corruption can crash the process and may enable code execution depending on heap layout. This issue is fixed in version 6.0.0-Alpha10.
Title Capstone SH disassembler `set_reg_n` heap buffer overflow via crafted SH2A FPU bytecode
Weaknesses CWE-122
References
Metrics cvssV4_0

{'score': 7.3, 'vector': 'CVSS:4.0/AV:L/AC:H/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N'}


Subscriptions

Capstone-engine Capstone
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-08-21T21:45:29.340Z

Reserved: 2026-06-17T16:59:42.760Z

Link: CVE-2026-55893

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-08-20T22:17:22.787

Modified: 2026-08-21T22:16:41.440

Link: CVE-2026-55893

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-08-20T21:32:46Z

Links: CVE-2026-55893 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-08-25T15:45:04Z

Weaknesses
  • CWE-122

    Heap-based Buffer Overflow

  • CWE-805

    Buffer Access with Incorrect Length Value