Miggo Logo

CVE-2016-7151: Capstone SEGV caused by a read memory access

5.5

CVSS Score
3.0

Basic Information

EPSS Score
0.39992%
Published
5/24/2022
Updated
11/21/2024
KEV Status
No
Technology
TechnologyPython

Technical Details

CVSS Vector
CVSS:3.0/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
capstonepip< 4.0.04.0.0

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

  1. The vulnerability description explicitly names X86_insn_reg_intel as the vulnerable function.
  2. The commit diff shows critical fixes to this function's bounds checking:
    • Added range check before binary search (insn_regs_intel_sorted[0].insn > id || insn_regs_intel_sorted[last].insn < id)
    • Fixed mid calculation placement in loop
    • Made sorting flag static to function
  3. CWE-125 (Out-of-bounds Read) matches the SEGV-from-read behavior described
  4. Multiple references (NVD, GHSA, commit message) all point to this function as the vulnerability location
  5. The patch clearly addresses improper array bounds validation in the binary search algorithm

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

**pston* *.*.* **s *n out-o*-*oun*s vuln*r**ility (S**V **us** *y * r*** m*mory ****ss) in X**_insn_r**_int*l in *r**/X**/X**M*ppin*.*.

Reasoning

*. T** vuln*r**ility **s*ription *xpli*itly n*m*s X**_insn_r**_int*l *s t** vuln*r**l* *un*tion. *. T** *ommit *i** s*ows *riti**l *ix*s to t*is *un*tion's *oun*s ****kin*: - ***** r*n** ****k ***or* *in*ry s**r** (insn_r**s_int*l_sort**[*].insn >