CVE-2016-2402
Improper 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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- High
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- None
- Integrity
- High
- Availability
- None
Exploit likelihood
What each source reports
NVD Score used
5.9
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.
- Record
CVE-2016-2402- CVSS 3.1
- 5.9 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N - CVSS 2.0
- 4.3 Medium
AV:N/AC:M/Au:N/C:N/I:P/A:N - Weakness
- CWE-295
- Updated
- 2026-11-02
CVE List No score
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.
- Record
CVE-2016-2402- Updated
- 2026-11-02
EUVDEUVD-2022-2383 No score
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.
- Record
EUVD-2022-2383- Updated
- 2026-11-03
GitHub AdvisoriesGHSA-4hc2-jh7r-wrc3
5.9
Improper 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.
- Record
GHSA-4hc2-jh7r-wrc3- CVSS 3.1
- 5.9 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N - Weakness
- CWE-295
- Updated
- 2026-11-02
OSV
5.9
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.
- Record
CVE-2016-2402- CVSS 3.1
- 5.9 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N - Updated
- 2026-11-02
OSVGHSA-4hc2-jh7r-wrc3
5.9
Improper 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.
- Record
GHSA-4hc2-jh7r-wrc3- CVSS 3.1
- 5.9 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N - Weakness
- CWE-295
- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
com.squareup.okhttp3:okhttpMaven |
through 2.7.3 | 2.7.4 |
com.squareup.okhttp3:okhttpMaven |
3.0.0 to 3.1.1 | 3.1.2 |
com.squareup.okhttp3:okhttpMaven |
before 2.7.4 | 2.7.4 |
com.squareup.okhttp3:okhttpMaven |
3.0.0 up to 3.1.2, plus listed versions 3.0.13.1.03.1.1 |
3.1.2 |
Public exploits
Links only. Every CVE stores no exploit code.
| Source | Link | Date |
|---|---|---|
| PoC in GitHub | ikoz/cert-pinning-flaw-poc | 2016-03-20 |
| PoC in GitHub | ikoz/certPinningVulnerableOkHttp | 2016-03-30 |
History
| Recorded | Changed | Sources |
|---|---|---|
| aliases | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV, PoC in GitHub |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2016-2402 is a medium vulnerability (CVSS 5.9) in Squareup Okhttp, published January 30, 2017. Public exploit code exists. EPSS puts the chance of exploitation in the next 30 days at 1.94%, the 80th percentile. Fixed in com.squareup.okhttp3:okhttp 2.7.4.
References
koz.io/pinning-cve-2016-2402
publicobject.com/2016/02/11/okhttp-certificate-pinning-vulnerability
openwall.com/lists/oss-security/2016/02/10/8
openwall.com/lists/oss-security/2016/02/18/7
lists.apache.org/thread.html/rd0e44e8ef71eeaaa3cf3d1b8b41eb25894372e2995ec908ce7624d26%40%3Ccommits.pulsar.apache.org%3E
nvd.nist.gov/vuln/detail/CVE-2016-2402
lists.apache.org/thread.html/rd0e44e8ef71eeaaa3cf3d1b8b41eb25894372e2995ec908ce7624d26@%3Ccommits.pulsar.apache.org%3E
github.com/advisories/GHSA-4hc2-jh7r-wrc3
github.com/square/okhttp