CVE-2021-0341
Square OkHttp can accept the wrong certificate
CVE-2021-0341 is a high vulnerability (CVSS 7.5) in Google Android, published February 1, 2021. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.88%, the 59th percentile. Fixed in com.squareup.okhttp3:okhttp 4.9.2.
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
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- None
- Availability
- None
Exploit likelihood
What each source reports
NVD Score used
7.5
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
- Record
CVE-2021-0341- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N - CVSS 2.0
- 5.0 Medium
AV:N/AC:L/Au:N/C:P/I:N/A:N - Weakness
- CWE-295
- Updated
- 2026-11-02
CVE List No score
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
- Record
CVE-2021-0341- Updated
- 2026-11-02
EUVDEUVD-2021-2960 No score
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
- Record
EUVD-2021-2960- Updated
- 2026-11-03
GitHub AdvisoriesGHSA-3cqm-mf7h-prrj
7.5
Square OkHttp can accept the wrong certificate
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-11 Android ID: A-171980069
- Record
GHSA-3cqm-mf7h-prrj- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N - Weakness
- CWE-295
- Updated
- 2026-11-02
OSVGHSA-3cqm-mf7h-prrj
7.5
Square OkHttp can accept the wrong certificate
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-11 Android ID: A-171980069
- Record
GHSA-3cqm-mf7h-prrj- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N - Weakness
- CWE-295
- Updated
- 2026-11-02
OSVRHSA-2023:2705
7.5
Red Hat Security Advisory: Red Hat Single Sign-On 7.6.3 security update on RHEL 7
- Record
RHSA-2023:2705- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
Show 5 moreShow less
OSVRHSA-2023:2706
7.5
Red Hat Security Advisory: Red Hat Single Sign-On 7.6.3 security update on RHEL 8
- Record
RHSA-2023:2706- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSVRHSA-2023:2707
7.5
Red Hat Security Advisory: Red Hat Single Sign-On 7.6.3 security update on RHEL 9
- Record
RHSA-2023:2707- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSVROOT-APP-MAVEN-CVE-2021-0341
7.5
CVE-2021-0341 in com.squareup.okhttp3:okhttp - Patched by Root
Root has patched CVE-2021-0341 in the com.squareup.okhttp3:okhttp package for Root:Maven. Multiple fixed versions available.
- Record
ROOT-APP-MAVEN-CVE-2021-0341- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N - Updated
- 2026-11-02
OSVASB-A-171980069 No score
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.
- Record
ASB-A-171980069- Updated
- 2026-11-02
OSVCLSA-2025-1766707708 No score
TuxCare security update for com.squareup.okhttp3:okhttp (1 CVE)
TuxCare rebuilt com.squareup.okhttp3:okhttp to address 1 CVE. Fixed in 3.14.9-tuxcare.1.
- Record
CLSA-2025-1766707708- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
com.squareup.okhttp3:okhttpMaven |
before 4.9.2 | 4.9.2 |
platform/external/okhttpAndroid |
8.0:0 up to 8.0:2021-02-01, plus listed versions 8.0 |
8.0:2021-02-01 |
platform/libcoreAndroid |
8.0:0 up to 8.0:2021-02-01, plus listed versions 8.0 |
8.0:2021-02-01 |
platform/external/okhttpAndroid |
8.1:0 up to 8.1:2021-02-01, plus listed versions 8.1 |
8.1:2021-02-01 |
platform/libcoreAndroid |
8.1:0 up to 8.1:2021-02-01, plus listed versions 8.1 |
8.1:2021-02-01 |
platform/external/okhttpAndroid |
9:0 up to 9:2021-02-01, plus listed versions 9 |
9:2021-02-01 |
platform/libcoreAndroid |
9:0 up to 9:2021-02-01, plus listed versions 9 |
9:2021-02-01 |
platform/external/okhttpAndroid |
10:0 up to 10:2021-02-01, plus listed versions 10 |
10:2021-02-01 |
platform/libcoreAndroid |
10:0 up to 10:2021-02-01, plus listed versions 10 |
10:2021-02-01 |
platform/external/okhttpAndroid |
11:0 up to 11:2021-02-01, plus listed versions 11 |
11:2021-02-01 |
Show 11 moreShow less
| Package | Affected | Fixed |
|---|---|---|
platform/libcoreAndroid |
11:0 up to 11:2021-02-01, plus listed versions 11 |
11:2021-02-01 |
com.squareup.okhttp3:okhttpTuxCare:Maven |
3.14.9 up to 3.14.9-tuxcare.1 | 3.14.9-tuxcare.1 |
com.squareup.okhttp3:okhttpMaven |
before 4.9.2, plus listed versions 3.0.03.0.0-RC13.0.13.1.03.1.1 Show 45 moreShow less3.1.23.10.03.11.03.12.03.12.13.12.103.12.113.12.123.12.133.12.23.12.33.12.43.12.53.12.63.12.73.12.83.12.93.13.03.13.13.14.03.14.13.14.23.14.33.14.43.14.53.14.63.14.73.14.83.14.93.2.03.3.03.3.13.4.03.4.0-RC13.4.13.4.23.5.03.6.03.7.03.8.03.8.13.9.03.9.14.0.04.0.0-RC1 |
4.9.2 |
rh-sso7-keycloakRed Hat:red_hat_single_sign_on:7.6::el7 |
before 0:18.0.7-1.redhat_00001.1.el7sso | 0:18.0.7-1.redhat_00001.1.el7sso |
rh-sso7-keycloak-serverRed Hat:red_hat_single_sign_on:7.6::el7 |
before 0:18.0.7-1.redhat_00001.1.el7sso | 0:18.0.7-1.redhat_00001.1.el7sso |
rh-sso7-keycloakRed Hat:red_hat_single_sign_on:7.6::el8 |
before 0:18.0.7-1.redhat_00001.1.el8sso | 0:18.0.7-1.redhat_00001.1.el8sso |
rh-sso7-keycloak-serverRed Hat:red_hat_single_sign_on:7.6::el8 |
before 0:18.0.7-1.redhat_00001.1.el8sso | 0:18.0.7-1.redhat_00001.1.el8sso |
rh-sso7-keycloakRed Hat:red_hat_single_sign_on:7.6::el9 |
before 0:18.0.7-1.redhat_00001.1.el9sso | 0:18.0.7-1.redhat_00001.1.el9sso |
rh-sso7-keycloak-serverRed Hat:red_hat_single_sign_on:7.6::el9 |
before 0:18.0.7-1.redhat_00001.1.el9sso | 0:18.0.7-1.redhat_00001.1.el9sso |
com.squareup.okhttp3:okhttpRoot:Maven |
before 3.14.9-aikido.1 | 3.14.9-aikido.14.6.0-aikido.13.14.9-aikido.2 |
io.root.com.squareup.okhttp3:okhttpRoot:Maven |
before 3.14.9-root.io.1 | 3.14.9-root.io.14.6.0-root.io.13.14.9-root.io.2 |
History
| When | Changed | Sources |
|---|---|---|
| 2026-11-03 | aliases | EUVD |
| 2026-11-02 | created | CVE List, GitHub Advisories, NVD, OSV |
References
source.android.com/security/bulletin/2021-02-01
nvd.nist.gov/vuln/detail/CVE-2021-0341
github.com/square/okhttp/issues/6724
github.com/square/okhttp/pull/6741
github.com/square/okhttp/commit/f574ea2f5259d9040f264ddeb582fb1ce563f10c
github.com/advisories/GHSA-3cqm-mf7h-prrj
Show 39 moreShow less
android.googlesource.com/platform/external/okhttp/+/ddc934efe3ed06ce34f3724d41cfbdcd7e7358fc
android.googlesource.com/platform/libcore/+/4076be9a99bad5ff7651540df976c57462c3b8ce
github.com/square/okhttp
access.redhat.com/errata/RHSA-2023:2705
access.redhat.com/security/updates/classification
bugzilla.redhat.com/show_bug.cgi?id=2129710
bugzilla.redhat.com/show_bug.cgi?id=2151988
bugzilla.redhat.com/show_bug.cgi?id=2153260
bugzilla.redhat.com/show_bug.cgi?id=2153379
bugzilla.redhat.com/show_bug.cgi?id=2154086
bugzilla.redhat.com/show_bug.cgi?id=2158916
bugzilla.redhat.com/show_bug.cgi?id=2166004
security.access.redhat.com/data/csaf/v2/advisories/2023/rhsa-2023_2705.json
access.redhat.com/security/cve/CVE-2021-0341
cve.org/CVERecord?id=CVE-2021-0341
access.redhat.com/security/cve/CVE-2022-4492
cve.org/CVERecord?id=CVE-2022-4492
nvd.nist.gov/vuln/detail/CVE-2022-4492
access.redhat.com/security/cve/CVE-2022-38752
cve.org/CVERecord?id=CVE-2022-38752
nvd.nist.gov/vuln/detail/CVE-2022-38752
access.redhat.com/security/cve/CVE-2022-41854
cve.org/CVERecord?id=CVE-2022-41854
nvd.nist.gov/vuln/detail/CVE-2022-41854
bitbucket.org/snakeyaml/snakeyaml/issues/543/stackoverflow-oss-fuzz-50355
bugs.chromium.org/p/oss-fuzz/issues/detail?id=50355
access.redhat.com/security/cve/CVE-2022-41881
cve.org/CVERecord?id=CVE-2022-41881
nvd.nist.gov/vuln/detail/CVE-2022-41881
access.redhat.com/security/cve/CVE-2022-45787
cve.org/CVERecord?id=CVE-2022-45787
nvd.nist.gov/vuln/detail/CVE-2022-45787
access.redhat.com/security/cve/CVE-2023-0482
cve.org/CVERecord?id=CVE-2023-0482
nvd.nist.gov/vuln/detail/CVE-2023-0482
access.redhat.com/errata/RHSA-2023:2706
security.access.redhat.com/data/csaf/v2/advisories/2023/rhsa-2023_2706.json
access.redhat.com/errata/RHSA-2023:2707
security.access.redhat.com/data/csaf/v2/advisories/2023/rhsa-2023_2707.json
Left out here: 24 versions. The JSON record has them.