Skip to main content

Insecure service configuration - App Transport Security

Description

The NSAppTransportSecurity function has the NSAllowsArbitraryLoads option enabled which allows insecure (HTTP) connections to the application. Good security practices state that insecure connections from the app to external servers should not be allowed.

Impact

Conduct MitM attacks over insecure channels to obtain sensitive user information.

Recommendation

Configure in the applications info.plist following good security practices.

Threat

Internal attacker on the same network segment.

Expected Remediation Time

⌚ 30 minutes.

Score

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

Base

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

Temporal

  • Exploit code madurity: X
  • Remediation level: O
  • Report confidence: X

Result

  • Vector string: CVSS:3.1/AV:A/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N/E:X/RL:O/RC:X
  • Score:
    • Base: 2.6
    • Temporal: 2.5
  • Severity:
    • Base: Low
    • Temporal: Low

Code Examples

Compliant code

The info.plist is correctly configured to avoid insecure http loads

<key>NSAppTransportSecurity</key>
<dict>
<key>NSExceptionDomains</key>
<dict>
<key>yourdomain.com</key>
<dict>
<key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
<false/>
<key>NSAllowsArbitraryLoads</key>
<false/>
</dict>
</dict>
</dict>

Non compliant code

The info.plist file has some insecure parameters

<key>NSAppTransportSecurity</key>
<dict>
<key>NSExceptionDomains</key>
<dict>
<key>yourdomain.com</key>
<dict>
<key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
<true/>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
</dict>
</dict>

Requirements

free trial

Search for vulnerabilities in your apps for free with our automated security testing! Start your 21-day free trial and discover the benefits of our Continuous Hacking Machine Plan. If you prefer a full service that includes the expertise of our ethical hackers, don't hesitate to contact us for our Continuous Hacking Squad Plan.