CVE-2016-2402
MEDIUM 5.9CVSS 3.1Improper Certificate Validation in OkHttp
OkHttp before 2.7.4 and 3.x before 3.1.2 allows man-in-the-middle attackers to bypass certificate pinning by sending a certificate chain with a certificate from a non-pinned trusted CA and the pinned certificate.
- Published
- 30 Jan 2017
- Last modified
- 17 Jun 2026
- Assigned by
- cve@mitre.org
- NVD status
- Modified
- Weakness
- CWE-295
- Also known as
- GHSA-4hc2-jh7r-wrc3
- Sources
- NVDJSONOSV GHSA-4hc2-jh7r-wrc3JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | MEDIUM 5.9 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N |
| OSV | GitHub | CVSS 3.1 | MEDIUM 5.9 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | MEDIUM 4.3 | AV:N/AC:M/Au:N/C:N/I:P/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | squareup | okhttpcpe:2.3:a:squareup:okhttp:*:*:*:*:*:*:*:* |
<= 2.7.3 | |
| NVD | squareup | okhttp3cpe:2.3:a:squareup:okhttp3:3.0.0:*:*:*:*:*:*:* |
= 3.0.0 | |
| NVD | squareup | okhttp3cpe:2.3:a:squareup:okhttp3:3.0.0:rc1:*:*:*:*:*:* |
= 3.0.0 | |
| NVD | squareup | okhttp3cpe:2.3:a:squareup:okhttp3:3.0.1:*:*:*:*:*:*:* |
= 3.0.1 | |
| NVD | squareup | okhttp3cpe:2.3:a:squareup:okhttp3:3.1.0:*:*:*:*:*:*:* |
= 3.1.0 | |
| NVD | squareup | okhttp3cpe:2.3:a:squareup:okhttp3:3.1.1:*:*:*:*:*:*:* |
= 3.1.1 | |
| OSV | Maven | com.squareup.okhttp3:okhttp | < 2.7.4 | 2.7.4 |
| OSV | Maven | com.squareup.okhttp3:okhttp | >= 3.0.0, < 3.1.2 | 3.1.2 |
References
- http://www.openwall.com/lists/oss-security/2016/02/10/8 · Mailing List, Third Party Advisory, WEB
- http://www.openwall.com/lists/oss-security/2016/02/18/7 · Mailing List, Third Party Advisory, WEB
- https://koz.io/pinning-cve-2016-2402/ · Technical Description, Third Party Advisory, WEB
- https://lists.apache.org/thread.html/rd0e44e8ef71eeaaa3cf3d1b8b41eb25894372e2995ec908ce7624d26%40%3Ccommits.pulsar.apache.org%3E
- https://publicobject.com/2016/02/11/okhttp-certificate-pinning-vulnerability/ · Vendor Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2016-2402 · ADVISORY
- https://github.com/square/okhttp · PACKAGE
- https://lists.apache.org/thread.html/rd0e44e8ef71eeaaa3cf3d1b8b41eb25894372e2995ec908ce7624d26@%3Ccommits.pulsar.apache.org%3E · WEB
History
- 25 Nov 2026 20:19 UTC · NVD: first stored (published 30 Jan 2017)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 13 May 2022)