xamarin.android.net.ServerCertificateCustomValidator_TrustManager does not check the TLS certificate chain correctly in .NET MAUI Android app Vulnerability issue

2023-07-07T05:17:49.36+00:00

Description: X509TrustManager.checkServerTrusted(...) needs to throw a java.security.cert.CertificateException if the certificate chain cannot be trusted.
The class xamarin.android.net.ServerCertificateCustomValidator_TrustManager never does this.

Recommendations: Use the default X509TrustManager whenever possible. If you have to use a custom
implementation, make sure to properly verify the certificate chain.

Regrading this TLS certificate issue we have tried below steps to provide fixes from .NET MAUI framework but no luck for the solution.

(1) By setting AndroidHttpClientHandlerType property value to Unset/the empty string
(2) By explicitly passing the handler property in all httpclient API instances.
(3) By explicitly setting the TLS 1.2
(4) By increasing the minimum SDK verion to 26 from 24

In Visual Studio .NET MAUI framework By default, X509TrustManager is being used in the application.

Please help us to provide the solution for this certificate issue.

Thanks you!!

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,113 questions
{count} votes