๐จ ๐๐ป๐ฑ๐ฟ๐ผ๐ถ๐ฑ ๐๐ฒ๐๐ฒ๐น๐ผ๐ฝ๐ฒ๐ฟ๐: ๐๐ต๐ฒ๐ฐ๐ธ ๐ฌ๐ผ๐๐ฟ ๐ข๐ธ๐๐๐๐ฝ ๐ฉ๐ฒ๐ฟ๐๐ถ๐ผ๐ป
A security issue, CVE-2026โ111943, affects certificate validation in certain OkHttp versions.
Letโs understand it with a simple real-world example ๐
๐ข ๐๐บ๐ฎ๐ด๐ถ๐ป๐ฒ ๐ฎ ๐ฆ๐ฒ๐ฐ๐๐ฟ๐ฒ ๐๐น๐๐ฏ
Your club trusts IDs issued by a particular authority.
But suddenly, you discover that the authorityโs signing keys have been compromised.
An attacker can now create a fake ID that looks completely legitimate.
Your existing security check says:
โ โThe ID is from a trusted authority.โ
But it doesnโt know that this particular certificate is compromised.
Thatโs the problem.
๐ด ๐ช๐ต๐ฎ๐ ๐๐ผ๐๐น๐ฑ ๐๐ฎ๐ฝ๐ฝ๐ฒ๐ป?
An attacker could potentially use a compromised certificate to impersonate a server and perform a man-in-the-middle attack.
For an Android app communicating with APIs, that could put sensitive traffic at risk.
๐ก๏ธ ๐ง๐ต๐ฒ ๐ช๐ผ๐ฟ๐ธ๐ฎ๐ฟ๐ผ๐๐ป๐ฑ
Get Udaya Murthyโs stories inย yourย inbox
Join Medium for free to get updates fromย thisย writer.
Before an official OkHttp update was available, developers could use a custom HostnameVerifier to reject certificates known to be compromised.
Conceptually:
val safeClient = client.newBuilder()
.hostnameVerifier(
ForbiddenCertificatesHostnameVerifier()
)
.build()Think of it as adding a temporary โDo NOT accept these specific IDsโ blacklist to your security guard.
โ ๐ง๐ต๐ฒ ๐๐ฒ๐๐ ๐ฆ๐ผ๐น๐๐๐ถ๐ผ๐ป
Instead of maintaining custom security code, upgrade OkHttp to a version containing the official fix.
๐ OkHttp 4.12.1
๐ OkHttp 5.5.1
After upgrading, OkHttp can reject the affected certificates without requiring your application to maintain its own workaround.
๐ก ๐๐ฒ๐ ๐ง๐ฎ๐ธ๐ฒ๐ฎ๐๐ฎ๐
Security vulnerabilities arenโt always solved by writing more application code.
Sometimes the safest fix is simply:
๐ Check your dependency version.
๐ Upgrade to the patched release.
๐ Remove temporary workarounds when theyโre no longer needed.
As Android developers, keeping dependencies updated isnโt just about getting new features.
๐ Itโs part of application security.
Would you check your Android projects for vulnerable OkHttp versions today?
#AndroidDev #AndroidSecurity #OkHttp #Kotlin #CyberSecurity #AndroidDevelopment #AppSecurity






