CVE-2016-2402
Description
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.
Severity
MEDIUM
CVSS v3
5.9
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N · source nvd
Exploit chance (EPSS)
1.940%
chance of exploitation in the next 30 days
higher than 80.5% of scored CVEs · 2026-11-17
CISA KEV
Not listed
Public exploit code
None public
Exploit references (NVD and CNA): 0
Metasploit modules: 0
Nuclei templates: 0
Weakness
- CWE-295: Improper Certificate Validation
Timeline
- 2017-01-30Published by the CNA22:00 UTC
- 2022-05-13GitHub advisory published (GHSA-4hc2-jh7r-wrc3)1929 days after publication
Exploit and advisory records
GitHub advisory GHSA-4hc2-jh7r-wrc3, affected packages:
| Ecosystem | Package | Vulnerable range | Patched |
|---|---|---|---|
| Maven | com.squareup.okhttp3:okhttp | < 2.7.4 | 2.7.4 |
| Maven | com.squareup.okhttp3:okhttp | >= 3.0.0, < 3.1.2 | 3.1.2 |
Affected products
| Vendor | Product |
|---|---|
| squareup | okhttp |
| squareup | okhttp3 |
References
- https://publicobject.com/2016/02/11/okhttp-certificate-pinning-vulnerability/
- http://www.openwall.com/lists/oss-security/2016/02/10/8
- http://www.openwall.com/lists/oss-security/2016/02/18/7
- https://koz.io/pinning-cve-2016-2402/
- https://lists.apache.org/thread.html/rd0e44e8ef71eeaaa3cf3d1b8b41eb25894372e2995ec908ce7624d26%40%3Ccommits.pulsar.apache.org%3E
Get more CVE data from the API.
curl 'https://api.contrastcyber.com/cve_lookup/CVE-2016-2402'curl 'https://api.contrastcyber.com/cve_risk_score/CVE-2016-2402'curl 'https://api.contrastcyber.com/cve_exploit/CVE-2016-2402'curl 'https://api.contrastcyber.com/cve_products/CVE-2016-2402'
Sources
- Vulnerability data from the National Vulnerability Database (NIST) and the CVE Program. CVE records: Copyright © 1999-2026, The MITRE Corporation, used under the CVE Program Terms of Use. CVE® is a registered trademark of The MITRE Corporation.
- CWE definitions: Copyright © 2006-2026, The MITRE Corporation, used under the CWE Terms of Use. CWE is a trademark of The MITRE Corporation.
- EPSS scores by FIRST.org EPSS, used with attribution.
- KEV catalog and SSVC decisions by CISA.
- Advisory data from the GitHub Advisory Database through OSV.dev (CC BY 4.0).
- Exploit metadata from the Exploit Database (GPL-2.0-only, metadata only).
- Nuclei template names from nuclei-templates (MIT).