CVE-2016-9015: Urllib3 Urllib3 Incorrect Certificate Validation Vulnerability
MODERATECVE-2016-9015 is a MODERATE (CVSS 3.7) urllib3 incorrect certificate validation vulnerability (CWE-295: Improper Certificate Validation) affecting Urllib3 libraries in the PyPI ecosystem. The issue involves urllib3 incorrect certificate validation. Remediation is available by upgrading affected packages to version 1.18.1.
CVE-2016-9015 at a Glance
Security Impact
CVSS: 3.7
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N).
How to Fix CVE-2016-9015
To remediate this vulnerability, upgrade all affected Urllib3 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 urllib3>=1.18.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show urllib3
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2016-9015, inspect your installed packages using pip:
pip show urllib3
Analyze the terminal output to locate any version of Urllib3 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.18.1), your application is affected.
Note: The pip show urllib3 command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-295: Improper Certificate Validation, where the product does not validate, or incorrectly validates, a certificate. In Urllib3, 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-9015 Affected Urllib3 Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
urllib3
|
PyPI |
≥ 1.17
< 1.18.1
|
1.18.1
|
References
Frequently Asked Questions
What is CVE-2016-9015?
Which Urllib3 versions are affected?
What version fixes CVE-2016-9015?
Is urllib3 affected?
What is the CVSS score of CVE-2016-9015?
What CWE is associated with CVE-2016-9015?
How can I check PyPI dependencies for CVE-2016-9015?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-v4w5-p2hg-8fh6",
"modified" : "2024-11-18T22:58:27Z",
"published" : "2022-05-17T03:05:04Z",
"aliases" : [ "CVE-2016-9015" ],
"summary" : "Urllib3 Incorrect Certificate Validation",
"details" : "Versions 1.17 and 1.18 of the Python urllib3 library suffer from a vulnerability that can cause them, in certain configurations, to not correctly validate TLS certificates. This places users of the library with those configurations at risk of man-in-the-middle and information leakage attacks. This vulnerability affects users using versions 1.17 and 1.18 of the urllib3 library, who are using the optional PyOpenSSL support for TLS instead of the regular standard library TLS backend, and who are using OpenSSL 1.1.0 via PyOpenSSL. This is an extremely uncommon configuration, so the security impact of this vulnerability is low.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "urllib3"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.17"
}, {
"fixed" : "1.18.1"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 1.18"
}
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2016-9015"
}, {
"type" : "WEB",
"url" : "https://github.com/urllib3/urllib3/commit/c32cdbc16a9634fa0f8c829d1270301570158715"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/urllib3/PYSEC-2017-98.yaml"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/urllib3/urllib3"
}, {
"type" : "WEB",
"url" : "https://web.archive.org/web/20210123184150/http://www.securityfocus.com/bid/93941"
}, {
"type" : "WEB",
"url" : "http://www.openwall.com/lists/oss-security/2016/10/27/6"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-295" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2023-07-31T20:59:18Z",
"nvd_published_at" : "2017-01-11T16:59:00Z"
}
}