NIST deprecates RSA-2048 from 2030. Find every one of them before attackers do.
📦 Android
Not in CISA KEV

CVE-2021-0341 — 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
Updated
Affected
10 pkgs
Patched
10 / 10
Exploits
None indexed
Exploitation data as of Nov 2, 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 CVEs59th percentile — riskier than 59% of all scored CVEsHighest risk
0.38%0.88%1.38%1.89%1.0%0.9%May 26Sep 26Nov 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

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.Product: AndroidVersions: Android-8.1 Android-9 Android-10 Android-11Android ID: A-171980069

Affected Packages

10 total 10 fixed
EcosystemPackageVulnerable rangeFix
📦Androidplatform/external/okhttp≥ 8.0:0&&< 8.0:2021-02-018.0:2021-02-01
📦Androidplatform/libcore≥ 8.0:0&&< 8.0:2021-02-018.0:2021-02-01
📦Androidplatform/external/okhttp≥ 8.1:0&&< 8.1:2021-02-018.1:2021-02-01
📦Androidplatform/libcore≥ 8.1:0&&< 8.1:2021-02-018.1:2021-02-01
📦Androidplatform/external/okhttp≥ 9:0&&< 9:2021-02-019:2021-02-01
📦Androidplatform/libcore≥ 9:0&&< 9:2021-02-019:2021-02-01

Affected Products

1 product · 4 configurations
OS
androidgoogle
4 versions
8.19.010.011.0

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

    Assume what was exposed is already known: rotate any credential, token or key that the affected component could return, restrict the endpoint to callers that genuinely need it, and strip sensitive fields from responses and error output at the boundary rather than relying on the client not to read them.

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?

Find it across Android, including transitive dependencies.

CVE-2021-0341: okhttp Info Disclosure — Fix Available