Skip to main content

Capstone Engine CVE-2025-67873

HIGH
Heap-based Buffer Overflow (CWE-122)
N/A vendor:alpine
7.8
CVSS 3.1 · NVD
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Craft malicious input bytes
  2. Exploit
    Victim disassembles via capstone skipdata path
  3. Execution
    Oversized memcpy overflows 24-byte cs_insn.bytes
  4. Impact
    Heap corruption enables potential code execution

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Heap buffer bounds checking
MITRE ATT&CK

1 technique across 1 tactic: Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires the host application embedding capstone to explicitly enable the skip-data feature (CS_OPT_SKIPDATA on) AND register a custom skipdata setup callback that returns a skip length greater than the 24-byte cs_insn.bytes buffer; the attacker must then supply input containing bytes that fail to decode (e.g. an invalid WASM opcode) so disassembly enters the skipdata path and performs the oversized memcpy. Limiting factors: this is a non-default configuration (skipdata with a large-returning callback is not enabled by default), exploitation is local (AV:L) via attacker-controlled input that a victim must choose to disassemble (UI:R), and no authentication is involved. Applications using capstone with default options or a bounded skip length are not affected.

Impact

Signals are mixed and point to a LOW real-world priority despite a 7.8 'High' CVSS. The CVSS vector (AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H) describes a local heap overflow (CWE-122) with full C/I/A impact but requiring user interaction - consistent with a victim disassembling an attacker-supplied binary. A proof-of-concept exists (publicly available exploit code exists, present as tests/integration/test_poc.c in the fix commit), which raises confidence the bug is genuine. However, EPSS is only 0.01% (3rd percentile) and there is no CISA KEV listing, indicating no observed widespread exploitation - classify as 'publicly available exploit code exists', NOT active exploitation. Crucially, the PoC and source diff show exploitation is NOT reachable in default configurations: it requires the host application to enable CS_OPT_SKIPDATA with a custom skipdata callback that returns a skip length larger than cs_insn.bytes (24 bytes). This conditionality is not reflected in the CVSS PR:N/AC:L metrics, so the raw score overstates realistic risk. Net: a legitimate memory-safety bug in a popular library, but low urgency outside applications that specifically use capstone's skipdata feature with a large-return callback.

Exploit ScenarioDerived

An attacker crafts a malicious binary/blob and convinces a victim (or an automated analysis pipeline) to disassemble it with a capstone-based tool that has the skipdata option enabled and a callback returning more than 24 bytes. When capstone hits undecodable bytes it enters the skipdata path and memcpy's the oversized skip length into the fixed 24-byte cs_insn.bytes buffer, overflowing the heap. A working PoC (test_poc.c, using CS_ARCH_WASM and a 1024-byte skip callback) is published in the fix commit, demonstrating the overflow in both cs_disasm and cs_disasm_iter.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv2 – Oct 13, 2026

Heap-based buffer overflow in the Capstone disassembly framework's skip-data path lets a malformed input corrupt memory in any host application that embeds the library. Exploitation requires the embedding application to have enabled the non-default CS_OPT_SKIPDATA option together with a custom skip-data callback that returns more than the 24-byte cs_insn.bytes buffer, and the victim must then disassemble attacker-supplied bytes that fail to decode; no authentication is required but the attack is local and user-interaction driven (CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H, 7.8). Publicly available exploit code exists in the form of a regression test shipped with the upstream fix, but there is no KEV-listed active exploitation and EPSS is only 0.01% (3rd percentile), so real-world priority is low; Alpine Linux shipped the fix in capstone 5.0.7-r0.

Earlier versions of this analysis (1)
v1 May 27, 2026 - 22:57

Capstone disassembly framework on Alpine Linux received a security fix in package version 5.0.7-r0, addressing an unspecified vulnerability. The nature, impact class, and exploitability of the underlying flaw are not disclosed in the available intelligence - no CVSS score, CWE classification, or vulnerability description has been published. With an EPSS score of 0.01% (3rd percentile), exploitation probability is extremely low, and no public exploit or CISA KEV listing exists at time of analysis.

RemediationAI

Vendor-released patch: Alpine Linux capstone 5.0.7-r0 - upgrade with 'apk upgrade capstone' (or 'apk add capstone=5.0.7-r0') and rebuild/restart anything statically linked against it. For upstream and non-Alpine consumers, apply commit cbef767ab33b82166d263895f24084b75b316df3 or adopt the first tagged release containing it, and verify per vendor advisory GHSA-hj6g-v545-v7jg; packages that link Capstone statically must be rebuilt, since updating the shared library alone will not help. Where an immediate upgrade is not possible, the effective compensating controls are configuration-level: disable skip-data entirely by not setting CS_OPT_SKIPDATA (trade-off: disassembly stops or errors on undecodable bytes instead of emitting '.byte' placeholders, which degrades analysis of firmware and obfuscated code), or if skip-data is required, clamp every custom cs_skipdata callback so it never returns more than sizeof(cs_insn.bytes) (24 bytes) - skip-data still functions for short runs but long undecodable regions are fragmented into multiple pseudo-instructions and reported sizes no longer reflect the true byte run. Additionally, avoid disassembling untrusted or attacker-supplied binaries inside privileged processes, and treat any tool that lets a user register an arbitrary skip-data callback as the primary exposure surface. Note that EPSS is 0.01% and there is no KEV-listed active exploitation, so these controls are proportionate to a low real-world priority.

Affects your stack

Find out whether the stacks and servers you run are on an affected version.

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Capstone is a widely embedded multi-architecture disassembly framework used by reverse-engineering tools, binary analyzers, and emulators. The flaw is classified as CWE-122 (heap-based buffer overflow) and lives in the skip-data feature: when a byte sequence cannot be decoded, capstone can emit a pseudo-instruction (default mnemonic '.byte') and advance by a length returned by a user-supplied cs_opt_skipdata callback. In cs_disasm() and cs_disasm_iter(), the code assigned that callback-returned skip length to insn_cache->size / insn->size and then performed memcpy(insn->bytes, buffer, skipdata_bytes) into the fixed-size cs_insn.bytes array (24 bytes) without validating the length against the destination size. The upstream fix (commit cbef767ab33b82166d263895f24084b75b316df3) clamps both the size assignment and the copy with MIN(skipdata_bytes, sizeof(insn->bytes)), and the same commit adds tests/integration/test_poc.c which drives the overflow by registering a callback returning 1024 bytes and feeding an invalid WASM opcode (0x06) to force the skip-data path. Because cs_insn structures are heap-allocated, an oversized skip length produces a controlled heap write of up to skipdata_bytes beyond the 24-byte inline buffer, with the C:H/I:H/A:H impact reflecting full loss of confidentiality, integrity, and availability in the hosting process rather than remote code execution on the target system.

Know when Capstone gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

NVD PRIMARY 7.8 HIGH
AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
vuln.today AI 7.8 HIGH

Local because the attacker-supplied blob is processed by a victim-run tool (UI:R); no auth needed (PR:N); a heap overflow yielding memory corruption supports C:H/I:H/A:H, though reachability depends on the skipdata configuration.

3.1 AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
4.0 AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from NVD.

CVSS VectorNVD

Attack Vector
Local
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

3
PoC Detected
Oct 13, 2026 - 11:22 NVD
https://github.com/capstone-engine/capstone/security/advisories/GHSA-hj6g-v545-v7jg
Patch released
Oct 13, 2026 - 11:22 NVD
https://github.com/capstone-engine/capstone/commit/cbef767ab33b82166d263895f24084b75b316df3
CVSS changed
Oct 13, 2026 - 11:22 NVD
7.8 (HIGH)

DescriptionNVD

Alpine Linux: capstone fixed in 5.0.7-r0

Executive ViewAI

Why It Matters

Capstone disassembly framework, a library embedded in various security and development tools, contains a heap-based buffer overflow (CVE-2025-67873) that can corrupt memory in host applications. Exploitation requires a non-default configuration (CS_OPT_SKIPDATA with a custom callback returning more than 24 bytes) and local user interaction, but publicly available exploit code exists. While no active exploitation has been observed, organizations using affected applications should prioritize patching to capstone 5.0.7-r0 to prevent potential memory corruption and code execution risks.

Business Impact: Low
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.0%
Top 97% exploitable
Prevalence
Medium
widely-used disassembly library in RE/security tooling, not universally deployed
Exploit
POC
Public exploit code exists
Data Quality
3 sources
Confidence: Low

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC Yes
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Defer
Exploitation· derived
Poc
System Exposure· derived
Small
Automatable· derived
No
Human Impact
Low

Priority Score

59
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +39
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.

A heap overflow occurs when a program writes data beyond the bounds of a buffer allocated in the heap memory region.

Affected Products (CPE)NVD

cpe:2.3:a:capstone-engine:capstone:*:*:*:*:*:*:*:*
cpe:2.3:a:capstone-engine:capstone:6.0.0:alpha1:*:*:*:*:*:*
cpe:2.3:a:capstone-engine:capstone:6.0.0:alpha2:*:*:*:*:*:*
cpe:2.3:a:capstone-engine:capstone:6.0.0:alpha3:*:*:*:*:*:*
cpe:2.3:a:capstone-engine:capstone:6.0.0:alpha4:*:*:*:*:*:*
cpe:2.3:a:capstone-engine:capstone:6.0.0:alpha5:*:*:*:*:*:*

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy