WaratekVRT Sign in

CVE-2016-2402 OkHttp

Affected softwareOkHttp
Severity5.9 Medium CVSS 3.1 2 scores
Fixed in2.7.4, 3.1.2
WeaknessCWE-295
Published30 Jan 2017
Updated17 Jun 2026

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.

Exploitation status

Proof of concept only

A proof of concept exists, but no reviewed exploit catalogue lists this CVE.

  • CISA KEV not listed
  • VulnCheck KEV not listed
  • CISA Vulnrichment no assessment published
  • Indexed PoC 2 indexed Published artifacts you can open, in GitHub PoC; first seen 2016-03-20.
  • EPSS 1.9% chance in 30 days
IndexArtifactStarsFirst seen
GitHub PoC Simple script for testing CVE-2016-2402 and similar flaws 13 2016-03-20
GitHub PoC OkHttp sample app vulnerable to CVE-2016-2402 10 2016-03-30

Waratek protection

Mitigation candidate

A kind of vulnerability Waratek's rules address, with exploit code published or exploitation reported. No rule exists and none is planned yet. The decision below says what we found to build a rule from.

  • Protection none
  • Action unverified
  • Review automated Inferred
  • Record active
Decided by The affected package being open source on Maven, so the fix can be read
Finding This CVE affects an open-source Java library published on Maven Central (Maven packages: com.squareup.okhttp3:okhttp), so it is squarely in ARMR's territory and the source needed to understand the defect is public. That makes it a candidate for an ARMR patch rule. No rule exists and none is scheduled: the diff between the affected and fixed versions has not been read, and a closer look may find no hook point ARMR can act on.

CVSS

5.9 MEDIUM v3.1 CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N 2 metrics

We show the highest score from the newest CVSS version. Scores from different versions can't be compared, and the first score listed is sometimes a 0.0 placeholder.

VersionScoreBandVectorAssignerType
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 NVD Primary published
CVSS 2.0 4.3 none AV:N/AC:M/Au:N/C:N/I:P/A:N NVD Primary

Affected software and releases

Maven packages

Affected and fixed versions, from OSV.dev
PackageIntroducedFixedLast affected
com.squareup.okhttp3:okhttp 0 2.7.4 unbounded
com.squareup.okhttp3:okhttp 3.0.0 3.1.2 unbounded

Products and versions

3 products, 8 version entries
SourceVendorProductSchemeAffected versions
osv com.squareup.okhttp3 okhttp generic < 2.7.4 · ≥ 3.0.0 and < 3.1.2
nvd squareup okhttp generic ≤ 2.7.3
nvd squareup okhttp3 generic 3.0.0 · 3.0.0:rc1 · 3.0.1 · 3.1.0 · 3.1.1

References

URLTags
https://github.com/square/okhttp PACKAGE
https://koz.io/pinning-cve-2016-2402 WEB
https://lists.apache.org/thread.html/rd0e44e8ef71eeaaa3cf3d1b8b41eb25894372e2995ec908ce7624d26@%3Ccommits.pulsar.apache.org%3E WEB
https://publicobject.com/2016/02/11/okhttp-certificate-pinning-vulnerability WEB
http://www.openwall.com/lists/oss-security/2016/02/10/8 WEB
http://www.openwall.com/lists/oss-security/2016/02/18/7 WEB
https://koz.io/pinning-cve-2016-2402/ Technical Description, Third Party Advisory
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

Timeline

Published2017-01-30By the CVE Program.
NVD record modified2026-06-17NVD's own last-modified date for this record.