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.
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
GitHub 2 repositories
-
ikoz/cert-pinning-flaw-poc ★ 13 · Mar 20, 2016
Simple script for testing CVE-2016-2402 and similar flaws
-
ikoz/certPinningVulnerableOkHttp ★ 10 · Mar 30, 2016
OkHttp sample app vulnerable to CVE-2016-2402
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| Maven | com.squareup.okhttp3:okhttp | < 2.7.4 | 2.7.4 | GHSA-4hc2-jh7r-wrc3 |
| Maven | com.squareup.okhttp3:okhttp | >= 3.0.0, < 3.1.2 | 3.1.2 | GHSA-4hc2-jh7r-wrc3 |
Advisories 1
- WID-SEC-2022-0770 IBM DB2: Mehrere Schwachstellen BSI CERT-Bund (WID) · Jan 8, 2026
References
- https://koz.io/pinning-cve-2016-2402/
- https://publicobject.com/2016/02/11/okhttp-certificate-pinning-vulnerability/
- [oss-security] 20160210 CVE request - OkHttp Certificate Pining Bypass mailing-list
- [oss-security] 20160217 Re: CVE request - OkHttp Certificate Pining Bypass mailing-list
- [pulsar-commits] 20201215 [GitHub] [pulsar] yanshuchong opened a new issue #8967: CVSS issue list mailing-list