CVE-2018-15560: Pycryptodome PyCryptodome Integer Overflow Vulnerability Vulnerability
HIGHCVE-2018-15560 is a HIGH (CVSS 7.5) pycryptodome integer overflow vulnerability vulnerability (CWE-190: Integer Overflow or Wraparound) affecting Pycryptodome libraries in the PyPI ecosystem. The issue involves pycryptodome integer overflow vulnerability. Remediation is available by upgrading affected packages to version 3.6.6.
CVE-2018-15560 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).
How to Fix CVE-2018-15560
To remediate this vulnerability, upgrade all affected Pycryptodome 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 pycryptodome>=3.6.6
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show pycryptodome
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2018-15560, inspect your installed packages using pip:
pip show pycryptodome
Analyze the terminal output to locate any version of Pycryptodome in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.6.6), your application is affected.
Note: The pip show pycryptodome 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 Pycryptodome, 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-2018-15560 Affected Pycryptodome Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
pycryptodome
|
PyPI |
< 3.6.6
|
3.6.6
|
References
Frequently Asked Questions
What is CVE-2018-15560?
Which Pycryptodome versions are affected?
What version fixes CVE-2018-15560?
Is pycryptodome affected?
What is the CVSS score of CVE-2018-15560?
What CWE is associated with CVE-2018-15560?
How can I check PyPI dependencies for CVE-2018-15560?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-hgg3-g7gr-66r7",
"modified" : "2024-10-21T20:21:37Z",
"published" : "2018-08-27T19:52:28Z",
"aliases" : [ "CVE-2018-15560" ],
"summary" : "PyCryptodome integer overflow vulnerability",
"details" : "PyCryptodome before 3.6.6 has an integer overflow in the data_len variable in AESNI.c, related to the AESNI_encrypt and AESNI_decrypt functions, leading to the mishandling of messages shorter than 16 bytes.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "pycryptodome"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.6.6"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2018-15560"
}, {
"type" : "WEB",
"url" : "https://github.com/Legrandin/pycryptodome/issues/198"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/Legrandin/pycryptodome"
}, {
"type" : "ADVISORY",
"url" : "https://github.com/advisories/GHSA-hgg3-g7gr-66r7"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/pycryptodome/PYSEC-2018-21.yaml"
}, {
"type" : "WEB",
"url" : "https://whitehatck01.blogspot.com/2018/08/integer-overflow-vulnerability-in.html"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-190" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2020-06-16T21:40:07Z",
"nvd_published_at" : "2018-08-20T00:29:00Z"
}
}