Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
📦 Android
Not in CISA KEV

CVE-2021-0341 platform/external/okhttp

CVE-2021-0341 is a CWE-295 vulnerability in platform/external/okhttp. A fix is available for platform/external/okhttp — see the affected versions and patch details below.

Also known asA-171980069GHSA-3cqm-mf7h-prrj
Published
Feb 1, 2021
Updated
Sep 18, 2026
Affected
10 pkgs
Patched
10 / 10
Exploits
None indexed
Exploitation data as of Sep 18, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

EPSS Exploitation Probability

via FIRST.org ↗
0.9%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs57th percentile — riskier than 57% of all scored CVEsHighest risk

EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.

Real-World Exposure

10 pkgs affected
📦platform/external/okhttp📦platform/libcore📦platform/external/okhttp📦platform/libcore📦platform/external/okhttp📦platform/libcore📦platform/external/okhttp📦platform/libcore+2 more

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Android packages — download data is not available via public APIs for these ecosystems.

Description

In verifyHostName of OkHostnameVerifier.java, there is a possible way to accept a certificate for the wrong domain due to improperly used crypto. This could lead to remote information disclosure with no additional execution privileges needed. User interaction is not needed for exploitation.

Affected Packages

10 total 10 fixed
EcosystemPackageVulnerable rangeFix
📦Androidplatform/external/okhttp8.0:0&&< 8.0:2021-02-018.0:2021-02-01
📦Androidplatform/libcore8.0:0&&< 8.0:2021-02-018.0:2021-02-01
📦Androidplatform/external/okhttp8.1:0&&< 8.1:2021-02-018.1:2021-02-01
📦Androidplatform/libcore8.1:0&&< 8.1:2021-02-018.1:2021-02-01
📦Androidplatform/external/okhttp9:0&&< 9:2021-02-019:2021-02-01
📦Androidplatform/libcore9:0&&< 9:2021-02-019:2021-02-01

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for platform/external/okhttp, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update platform/external/okhttp to 8.0:2021-02-01 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2021-0341 is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like CVE-2021-0341 can be triaged on real exposure rather than presence alone.

Tailored to CVE-2021-0341. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Fixing This On Your OS

If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.

Red HatModerate
ProductFixed inAdvisory
Red Hat AMQ Streams 2.4.0okhttpRHSA-2023:3223
Red Hat Data Grid 8.4.2okhttpRHSA-2023:2723
Red Hat JBoss Enterprise Application Platform Expansion PackokhttpRHSA-2023:0756
Red Hat OpenShift Dev Spaces 3 Containersdevspaces/server-rhel8:3.16-14RHSA-2024:6667
Red Hat Single Sign-On 7okhttpRHSA-2023:2713
Red Hat Single Sign-On 7.6 for RHEL 7rh-sso7-keycloak-0:18.0.7-1.redhat_00001.1.el7ssoRHSA-2023:2705
Red Hat Single Sign-On 7.6 for RHEL 8rh-sso7-keycloak-0:18.0.7-1.redhat_00001.1.el8ssoRHSA-2023:2706
Red Hat Single Sign-On 7.6 for RHEL 9rh-sso7-keycloak-0:18.0.7-1.redhat_00001.1.el9ssoRHSA-2023:2707

Frequently Asked Questions

In verifyHostName of OkHostnameVerifier.java, there is a possible way to accept a certificate for the wrong domain due to improperly used crypto. This could lead to remote information disclosure with no additional execution privileges needed. User interaction is not needed for exploitation.
O3 Security · Impact-Aware SCA

Is CVE-2021-0341 in your dependencies?

O3 Security finds CVE-2021-0341 across Android dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.

CVE-2021-0341: platform/external/okhttp | O3 Security