CVE-2016-9243: Cryptography Improper Input Validation Vulnerability
HIGHCVE-2016-9243 is a HIGH (CVSS 7.5) improper input validation vulnerability (CWE-20: Improper Input Validation) affecting Cryptography libraries in the PyPI ecosystem. The issue involves improper input validation in cryptography. Remediation is available by upgrading affected packages to version 1.5.3.
CVE-2016-9243 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.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N).
How to Fix CVE-2016-9243
To remediate this vulnerability, upgrade all affected Cryptography 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 cryptography>=1.5.3
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show cryptography
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2016-9243, inspect your installed packages using pip:
pip show cryptography
Analyze the terminal output to locate any version of Cryptography in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.5.3), your application is affected.
Note: The pip show cryptography command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-20: Improper Input Validation, where the product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. In Cryptography, 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-2016-9243 Affected Cryptography Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
cryptography
|
PyPI |
< 1.5.3
|
1.5.3
|
References
Frequently Asked Questions
What is CVE-2016-9243?
Which Cryptography versions are affected?
What version fixes CVE-2016-9243?
Is cryptography affected?
What is the CVSS score of CVE-2016-9243?
What CWE is associated with CVE-2016-9243?
How can I check PyPI dependencies for CVE-2016-9243?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-q3cj-2r34-2cwc",
"modified" : "2024-09-13T20:08:25Z",
"published" : "2022-05-17T02:51:56Z",
"aliases" : [ "CVE-2016-9243" ],
"summary" : "Improper input validation in cryptography",
"details" : "HKDF in cryptography before 1.5.3 returns an empty byte-string if used with a length less than algorithm.digest_size.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "cryptography"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.5.3"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2016-9243"
}, {
"type" : "WEB",
"url" : "https://github.com/pyca/cryptography/issues/3211"
}, {
"type" : "WEB",
"url" : "https://github.com/pyca/cryptography/commit/b924696b2e8731f39696584d12cceeb3aeb2d874"
}, {
"type" : "WEB",
"url" : "https://cryptography.io/en/latest/changelog"
}, {
"type" : "WEB",
"url" : "https://cryptography.io/en/latest/changelog/#v1-5-3"
}, {
"type" : "ADVISORY",
"url" : "https://github.com/advisories/GHSA-q3cj-2r34-2cwc"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/pyca/cryptography"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/cryptography/PYSEC-2017-8.yaml"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/5R2ZOBMPWDFFHUZ6QOZZY36A6H5CGJXL"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/U23KDR2M2N7W2ZSREG63BVW7D4VC6CIZ"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/WQ5G7KHKZC4SI23JE7277KZXM57GEQKT"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/5R2ZOBMPWDFFHUZ6QOZZY36A6H5CGJXL"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/U23KDR2M2N7W2ZSREG63BVW7D4VC6CIZ"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/WQ5G7KHKZC4SI23JE7277KZXM57GEQKT"
}, {
"type" : "WEB",
"url" : "http://www.openwall.com/lists/oss-security/2016/11/09/2"
}, {
"type" : "WEB",
"url" : "http://www.securityfocus.com/bid/94216"
}, {
"type" : "WEB",
"url" : "http://www.ubuntu.com/usn/USN-3138-1"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-20" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2022-06-17T21:29:04Z",
"nvd_published_at" : "2017-03-27T17:59:00Z"
}
}