Vulnerabilities in pkg:pypi/pycrypto
PACKAGECVE-2013-1445 is a HIGH (CVSS 7.5) pycrypto does not properly reseed vulnerability (CWE-332: Insufficient Entropy in PRNG) affecting Pycrypto libraries in the PyPI ecosystem. The issue involves pycrypto does not properly reseed prng before allowing access. Remediation is available by upgrading affected packages to version 2.6.1.
pkg:pypi/pycrypto
Vulnerability advisories affecting package pkg:pypi/pycrypto. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-x377-f64p-hf5j | CVE-2013-1445 | HIGH | PyCrypto does not properly reseed PRNG before allowing access |
| GHSA-cq27-v7xp-c356 | CVE-2013-7459 | CRITICAL | Buffer Overflow in pycrypto |
| GHSA-6528-wvf6-f6qg | CVE-2018-6594 | HIGH | Pycrypto generates weak key parameters |
CVE-2013-1445 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:H/I:N/A:N).
How to Fix CVE-2013-1445
To remediate this vulnerability, upgrade all affected Pycrypto 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 pycrypto>=2.6.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show pycrypto
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2013-1445, inspect your installed packages using pip:
pip show pycrypto
Analyze the terminal output to locate any version of Pycrypto in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.6.1), your application is affected.
Note: The pip show pycrypto command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-332: Insufficient Entropy in PRNG, where the lack of entropy available for, or used by, a pseudo-random number generator (prng) can be a stability and security threat. In Pycrypto, 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-2013-1445 Affected Pycrypto Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
pycrypto
|
PyPI |
< 2.6.1
|
2.6.1
|
References
Frequently Asked Questions
What is CVE-2013-1445?
Which Pycrypto versions are affected?
What version fixes CVE-2013-1445?
Is pycrypto affected?
What is the CVSS score of CVE-2013-1445?
What CWE is associated with CVE-2013-1445?
How can I check PyPI dependencies for CVE-2013-1445?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-x377-f64p-hf5j",
"modified" : "2024-10-21T20:27:56Z",
"published" : "2022-05-17T04:59:18Z",
"aliases" : [ "CVE-2013-1445" ],
"summary" : "PyCrypto does not properly reseed PRNG before allowing access",
"details" : "The Crypto.Random.atfork function in PyCrypto before 2.6.1 does not properly reseed the pseudo-random number generator (PRNG) before allowing a child process to access it, which makes it easier for context-dependent attackers to obtain sensitive information by leveraging a race condition in which a child process is created and accesses the PRNG within the same rate-limit period as another process.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "pycrypto"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.6.1"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2013-1445"
}, {
"type" : "WEB",
"url" : "https://github.com/dlitz/pycrypto/commit/19dcf7b15d61b7dc1a125a367151de40df6ef175"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/pycrypto/pycrypto"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/pycrypto/PYSEC-2013-29.yaml"
}, {
"type" : "WEB",
"url" : "http://www.debian.org/security/2013/dsa-2781"
}, {
"type" : "WEB",
"url" : "http://www.openwall.com/lists/oss-security/2013/10/17/3"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-332" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2024-04-22T22:55:06Z",
"nvd_published_at" : "2013-10-26T17:55:00Z"
}
}