CVE-2017-6952: Capstone Capstone Integer Overflow Vulnerability
HIGHCVE-2017-6952 is a HIGH (CVSS 8.8) capstone integer overflow vulnerability (CWE-190: Integer Overflow or Wraparound) affecting Capstone libraries in the PyPI ecosystem. The issue involves capstone integer overflow. Remediation is available by upgrading affected packages to version 3.0.5rc2.
CVE-2017-6952 at a Glance
Security Impact
CVSS: 8.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H).
How to Fix CVE-2017-6952
To remediate this vulnerability, upgrade all affected Capstone dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install capstone>=3.0.5rc2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show capstone
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2017-6952, inspect your installed packages using pip:
pip show capstone
Analyze the terminal output to locate any version of Capstone in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.0.5rc2), your application is affected.
Note: The pip show capstone command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-190: Integer Overflow or Wraparound, where the product performs a calculation that can produce an integer overflow or wraparound when the logic assumes that the resulting value will always be larger than the original value. this occurs when an integer value is incremented to a value that is too large to store in the associated representation. when this occurs, the value may become a very small or negative number. In Capstone, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2017-6952 Affected Capstone Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
capstone
|
PyPI |
< 3.0.5rc2
|
3.0.5rc2
|
References
Frequently Asked Questions
What is CVE-2017-6952?
Which Capstone versions are affected?
What version fixes CVE-2017-6952?
Is capstone affected?
What is the CVSS score of CVE-2017-6952?
What CWE is associated with CVE-2017-6952?
How can I check PyPI dependencies for CVE-2017-6952?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-3v99-hpv7-9hh9",
"modified" : "2024-11-21T22:17:39Z",
"published" : "2022-05-17T02:51:51Z",
"aliases" : [ "CVE-2017-6952" ],
"summary" : "Capstone Integer overflow",
"details" : "Integer overflow in the cs_winkernel_malloc function in winkernel_mm.c in Capstone 3.0.4 and earlier allows attackers to cause a denial of service (heap-based buffer overflow in a kernel driver) or possibly have unspecified other impact via a large value.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "capstone"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.0.5rc2"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2017-6952"
}, {
"type" : "WEB",
"url" : "https://github.com/aquynh/capstone/commit/6fe86eef621b9849f51a5e1e5d73258a93440403"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/capstone-engine/capstone"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/capstone/PYSEC-2017-113.yaml"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-190" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2024-11-21T22:17:39Z",
"nvd_published_at" : "2017-03-16T21:59:00Z"
}
}