Skip to content
Noroxi
CVE-2016-2402· NVD / CVE Program· CNA mitre

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 wit

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.

MediumCVSS 5.9 · v3.1—Proof of concept Fix available
Published
Jan 30, 2017
Updated
Jun 16, 2026
EPSS
2.2% · 82th percentile
Follow this CVE

Sign in to follow · You’ll be notified if a followed record enters KEV, gets an exploit or is updated.

Report tools

JSON

Action score

24

Monitor

Low priority for now.

CVSS
23 / 40 · 5.9 / 10
CISA KEV
0 / 30 · Not listed
EPSS
1 / 30 · 2.2%

Affected systems

VendorProduct
squareupokhttp
squareupokhttp3

Affected versions

NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.

  • squareup okhttpup to 2.7.3 inclusive
  • squareup okhttp33.0.0
  • squareup okhttp33.0.1
  • squareup okhttp33.1.0
  • squareup okhttp33.1.1

Package-level exposure

OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.

EcosystemPackageAffected rangeFix
Mavencom.squareup.okhttp3:okhttpfrom 3.0.0 · before 3.1.23.1.2
Mavencom.squareup.okhttp3:okhttpbefore 2.7.42.7.4

Other highest-scoring records for the same primary product.

  • CVE-2018-20200CertificatePinner.java in OkHttp 3.x through 3.12.0 allows man-in-the-middle attackers to bypass certificate pinning by changing SSLContext
    24Monitor
  • CVE-2023-0833Red hat a-mq streams: component version with information disclosure flaw
    22Monitor

Remediation

Which version to upgrade to

Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.

Product / packageFixed versionSource
Maven:com.squareup.okhttp3:okhttp2.7.4Package registry (OSV)
Maven:com.squareup.okhttp3:okhttp3.1.2Package registry (OSV)

Exploit status

Proof of concept available

A public proof of concept or detection signature exists. Exploit knowledge is out there; don't delay patching.

Evidence

  • Proof-of-concept repository on GitHub ×2

Noroxi does not host or link to exploit code. Metasploit module names and Nuclei template ids are shown (names, not code); Exploit-DB entries and PoC repositories are given as counts only.

Public exploit evidence
SourceKindDate
Proof-of-concept repository on GitHubstars:132016-03-20
Proof-of-concept repository on GitHubstars:102016-03-30

Research context

For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.

Timeline

From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.

  1. First PoC-317 d
  2. Published
  3. TodaySep 30, 2026+3530 d
EPSS, last 120 days

FIRST EPSS daily score; only changes of 0.01 or more are recorded (step chart).

Patch and commit links

Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.

No commit or PR link among the references.

Finders, reporters and analysts named in the CNA record. Click a name for that researcher’s other records.

No credits in the CNA record.

Variant candidates

Same product, same weakness class, within 18 months. If the patch missed the root cause, the sibling bug is here.

No nightly-computed relations.

Chain candidates

An authentication bypass and a privilege-requiring bug in the same product, published close together: combined they may become an unauthenticated path.

—

Bug bounty scope

No known public program.

Source: bounty-targets-data (public HackerOne, Bugcrowd, Intigriti, YesWeHack listings).

Technical details

Attack conditions

  • Anyone who can reach it over the internet can trigger it.
  • No account or password is required.
  • No user action is required.
  • Special conditions such as timing or configuration are required.

If successful

Confidentiality
none
Integrity
high · data or configuration can be modified
Availability
none
Attack vector
Network
Attack complexity
High
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality impact
None
Integrity impact
High
Availability impact
None

CVSS vector

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N

nvd-primary

Root cause

A certificate validation error is silently swallowed instead of terminating the connection. Often, code added for a test environment makes its way into production.

A representative example of this vulnerability class. Not the vendor's source code; it shows the faulty pattern and its fix.

Vulnerable

kotlin
override fun checkServerTrusted(chain: Array<X509Certificate>, type: String) {  // Left empty for the test environment}

Fixed

kotlin
val client = OkHttpClient.Builder()  .certificatePinner(    CertificatePinner.Builder()      .add("api.sirius.example", "sha256/…")      .build()  ).build()

Attack context

MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.

Noroxi analysis

No Noroxi analysis for this record yet

We don't hand-write analysis for all 385,000+ vulnerabilities; that wouldn't be honest. For notable, high-impact vulnerabilities our team writes the mechanism, detection and remediation steps.

We use this product, ask for help

Change log

  1. Fix✗ → ✓

For records you follow, these changes also arrive as notifications. →

References

All records