Skip to content

Inadequate encryption strength

Description

The application enables insecure TLS protocol versions. Only TLSv1.2, TLSv1.3, DTLSv1.2, and DTLSv1.3 should be allowed. Enforcing TLS 1.2 as the minimum protocol version and disallowing older versions mitigates potential security risks.

Examples

Insecure Code

kotlin
SSLContext tlsContext = SSLContext.getInstance("TLSv1.0");

Secure Code

kotlin
SSLContext tlsContext = SSLContext.getInstance("TLSv1.2");

Remediation

Explicitly define a secure configuration by setting the enabled protocols to TLSv1.2, TLSv1.3, DTLSv1.2, or DTLSv1.3 when creating an SSLContext.

Rule Details

FieldValue
IDCODE-0311
CategoryCrypto
SeverityMEDIUM
CWECWE-326
ConfidenceHIGH
ImpactMEDIUM
LikelihoodMEDIUM
ExploitabilityMODERATE
Tagsinsecure protocol, TLS version
OWASPA3:2017-Sensitive Data Exposure, A02:2021-Cryptographic Failures