Skip to main content

Security controls bypass or absence - SSLPinning

Description

The application does not define an SSLPinning mechanism or configures it insecurely, allowing an attacker to intercept and manipulate the information that travels through the application

Impact

  • Intercept data from the app.
  • Tamper data from the app.

Recommendation

  • Establish security controls for certificates that include integrity checks and white lists of trusted public keys that will be accepted by the application

  • Define pin-sets with integrity hashes in res/xml/network_security_config.xml file

Threat

Anonymous attacker from the Internet.

Expected Remediation Time

⌚ 300 minutes.

Score

Default score using CVSS 3.1. It may change depending on the context of the vulnerability.

Base

  • Attack vector: N
  • Attack complexity: L
  • Privileges required: N
  • User interaction: N
  • Scope: U
  • Confidentiality: L
  • Integrity: L
  • Availability: N

Temporal

  • Exploit code madurity: P
  • Remediation level: U
  • Report confidence: C

Result

  • Vector string: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N/E:P/RL:U/RC:C
  • Score:
    • Base: 6.5
    • Temporal: 6.2
  • Severity:
    • Base: Medium
    • Temporal: Medium

Code Examples

Compliant code

There are correctly defined pin-sets in the security configuration file

<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<domain-config>
<domain includeSubdomains="true">example.com</domain>
<pin-set>
<pin digest="SHA-256">ZC3lTYTDBJQVf1P2V7+fibTqbIsWNR/X7CWNVW+CEEA=</pin>
<pin digest="SHA-256">GUAL5bejH7czkXcAeJ0vCiRxwMnVBsDlBMBsFtfLF8A=</pin>
</pin-set>
</domain-config>
</network-security-config>

Non compliant code

The application does not define any SSLPining mechanisms in the security configuration xml file

<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<domain-config>
<domain includeSubdomains="true">example.com</domain>
</domain-config>
</network-security-config>

Requirements