
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2025-68114 is a stack buffer underflow/overflow vulnerability in the Capstone disassembly framework affecting versions 6.0.0-Alpha5 and all prior releases. The flaw exists in the SStream_concat function, where an unchecked return value from cs_vsnprintf allows a malicious cs_opt_mem.vsnprintf callback to drive SStream's internal index negative or past the buffer boundary, leading to memory corruption on the next write. It was disclosed on December 17, 2025, with a fix committed to the Capstone repository shortly after. The GitHub Security Advisory (GHSA-85f5-6xr3-q76r) rates this as Moderate with a CVSS v3.1 score of 4.8, while NVD assigns a higher score of 9.8 (Critical) based on a different attack vector assessment (GitHub Advisory, MSRC).
The root cause is classified as CWE-120 (Buffer Copy without Checking Size of Input) and CWE-124 (Buffer Underwrite/Buffer Underflow). In SStream.c (lines 227–244), SStream_concat adds the return value of cs_vsnprintf directly to ss->index without validating that the return is non-negative or within the remaining buffer space. A negative return value (e.g., -1) causes an integer underflow of the index field (originally typed as int), and a subsequent call to SStream_concat1 then writes before or beyond ss->buffer, which is stack-allocated. The vsnprintf hook is attacker-controlled via cs_option(CS_OPT_MEM), meaning any embedding that permits untrusted code to install a custom cs_opt_mem callback can be exploited. A proof-of-concept using AddressSanitizer on macOS was included in the advisory, demonstrating a stack-buffer-overflow in SStream_concat1 (GitHub Advisory, Fix Commit).
Successful exploitation results in stack memory corruption, which can lead to information disclosure, data integrity violations, or denial of service within the process using Capstone. In the worst case, an attacker who can control the cs_opt_mem.vsnprintf callback may achieve arbitrary code execution in the context of the embedding application. The vulnerability is not reachable through untrusted binary input alone — it requires the ability to set Capstone's memory hooks, limiting the attack surface to scenarios where untrusted plugins or scripts can configure cs_option(CS_OPT_MEM) (GitHub Advisory).
A proof-of-concept demonstrating the stack buffer overflow via AddressSanitizer was published as part of the GitHub Security Advisory at the time of disclosure. There is no evidence of in-the-wild exploitation or threat actor attribution as of the time of this report. The EPSS score is approximately 0.013% (0.000130), indicating a very low probability of exploitation in the near term. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog (GitHub Advisory).
cs_option(CS_OPT_MEM) interface to untrusted code (e.g., a plugin system or scripting engine).vsnprintf function that returns -1 (or another negative value) regardless of input, forcing SStream_concat to add a negative value to ss->index.cs_option(0, CS_OPT_MEM, (size_t)&mem) with a cs_opt_mem struct pointing to the malicious vsnprintf implementation.SStream_concat (e.g., disassembling any instruction), which drives ss->index to underflow.SStream_concat1 uses the corrupted (underflowed) index to write a character before ss->buffer on the stack, causing memory corruption.stack-buffer-overflow in SStream_concat1.SStream buffer regions.cs_opt_mem callback registrations (cs_option(CS_OPT_MEM, ...)) in untrusted plugin or script code loaded by the application.The fix is available in commit 2c7797182a1618be12017d7d41e0b6581d5d529e, which adds a negative-return check before updating ss->index and changes the index field type from int to size_t to prevent underflow. Users should upgrade to Capstone 6.0.0 (final release) or apply the patch commit. As a workaround where immediate patching is not possible, restrict or prohibit untrusted code from calling cs_option(CS_OPT_MEM) to install custom vsnprintf implementations. Downstream distributions including SUSE, Red Hat (RHSA-2026:4898, RHSA-2026:5125, RHSA-2026:5123, RHSA-2026:5224, RHSA-2026:6817), Amazon Linux (ALAS2023-2026-1772, ALAS2-2026-3351), and Debian have issued updated packages (Fix Commit, GitHub Advisory).
The vulnerability was reported by GitHub user Finder16 and published by maintainer Rot127 via GitHub Security Advisory. Coverage has appeared in Linux security news outlets including Pro-Linux.de and LinuxSecurity.com, primarily in the context of distribution security updates for SUSE, Red Hat, Oracle Linux, and AlmaLinux. No significant social media controversy or high-profile researcher commentary beyond the advisory itself has been observed (GitHub Advisory).
Fix availability across major Linux distributions and their releases.
bionic (esm-apps)
capstone
devel
capstone
focal (esm-apps)
capstone
jammy
capstone
jammy (esm-apps)
capstone
noble
capstone
noble (esm-apps)
capstone
resolute
capstone
OpenShift
RHEL 8
RHEL 9
:appstream:capstone-0:4.0.2-5.el9_0.src
RHEL 10
capstone-0:5.0.1-7.el10_0.src
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."