TExcelTAD
Home › Wireless, IoT & Mobile Security › iOS Info.plist Review: App Transport Security and URL Schemes

iOS Info.plist Review: App Transport Security and URL Schemes

iOS apps carry their declarations in Info.plist, a property list inside the app bundle. It holds the app's identity, the reasons it gives the user for each permission, the URL schemes it answers to, and its App Transport Security (ATS) settings: the switch that decides whether the platform's strict TLS rules apply to the app's connections. Since iOS 9 (2015), ATS requires HTTPS with TLS 1.2 or later, forward-secret cipher suites and valid certificates by default. Apps can relax every one of those rules in Info.plist, and the relaxations are what a reviewer looks for. This lesson builds a checker with Python's plistlib and discusses the fixes.

ATS settings

Key (inside NSAppTransportSecurity) Effect Review note
NSAllowsArbitraryLoads turns ATS off for all connections almost never justified; App Store review asks for a reason
NSAllowsArbitraryLoadsInWebContent off for web views only for browsers that load arbitrary sites
NSAllowsArbitraryLoadsForMedia off for AVFoundation media streaming from servers you don't control
NSAllowsLocalNetworking allows plain connections to local addresses and .local names needed for some local device control; keep the traffic authenticated
NSExceptionDomains → domain per-domain exceptions, optionally NSIncludesSubdomains the most common place for leftovers
… NSExceptionAllowsInsecureHTTPLoads plain HTTP to that domain a finding for any domain carrying user data
… NSExceptionMinimumTLSVersion accept TLS below 1.2 TLS 1.0/1.1 are deprecated (TLS limits)
… NSExceptionRequiresForwardSecrecy = false allows cipher suites without forward secrecy see forward secrecy

ATS covers URLSession and the higher-level APIs built on it; lower-level networking (sockets, Network.framework raw connections, third-party TLS libraries) is not checked by ATS, so a clean plist is necessary but not sufficient.

Other security-relevant keys

  • CFBundleURLTypes (custom URL schemes such as labhome://): any app can register the same scheme, and iOS doesn't guarantee which one opens. Don't pass secrets (OAuth codes, pairing tokens) through custom schemes; use universal links (https URLs tied to your domain by an apple-app-site-association file) and, for OAuth, PKCE (PKCE).
  • UIFileSharingEnabled and LSSupportsOpeningDocumentsInPlace: expose the app's Documents folder to the user in Files and Finder; nothing sensitive may live there.
  • NS…UsageDescription keys: one per protected resource. Each should match a real feature and explain it; a vague string often marks a permission nobody needs.
  • NSLocalNetworkUsageDescription and NSBonjourServices: required for discovering devices on the local network (iOS 14+), relevant for smart-home apps.
  • Entitlements (a separate signed file, not Info.plist): app groups, keychain sharing, associated domains. Review them together.

The checker

The sample app's Info.plist (synthetic) and a review with plistlib, which reads XML and binary property lists:

python · try it yourself
import plistlib

INFO_PLIST = b"""<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"><dict>
  <key>CFBundleIdentifier</key><string>test.lab.LabHome</string>
  <key>NSAppTransportSecurity</key><dict>
    <key>NSAllowsArbitraryLoads</key><true/>
    <key>NSExceptionDomains</key><dict>
      <key>api.lab.test</key><dict>
        <key>NSIncludesSubdomains</key><true/>
        <key>NSExceptionAllowsInsecureHTTPLoads</key><true/>
        <key>NSExceptionMinimumTLSVersion</key><string>TLSv1.0</string>
      </dict>
    </dict>
  </dict>
  <key>CFBundleURLTypes</key><array><dict><key>CFBundleURLSchemes</key><array><string>labhome</string></array></dict></array>
  <key>UIFileSharingEnabled</key><true/>
  <key>NSCameraUsageDescription</key><string>Scan the QR code on your LabHome device.</string>
  <key>NSBluetoothAlwaysUsageDescription</key><string>Find and pair LabHome devices near you.</string>
  <key>NSLocationAlwaysAndWhenInUseUsageDescription</key><string>Location.</string>
</dict></plist>"""

p = plistlib.loads(INFO_PLIST)
out = []
ats = p.get("NSAppTransportSecurity", {})
if ats.get("NSAllowsArbitraryLoads"):
    out.append(("HIGH", "NSAllowsArbitraryLoads = true: ATS is off for every connection"))
if ats.get("NSAllowsArbitraryLoadsInWebContent"):
    out.append(("MED", "ATS off for web views"))
for domain, rules in ats.get("NSExceptionDomains", {}).items():
    scope = f"{domain}{' and subdomains' if rules.get('NSIncludesSubdomains') else ''}"
    if rules.get("NSExceptionAllowsInsecureHTTPLoads"):
        out.append(("HIGH", f"plain HTTP allowed to {scope}"))
    tls = rules.get("NSExceptionMinimumTLSVersion")
    if tls in ("TLSv1.0", "TLSv1.1"):
        out.append(("MED", f"{tls} accepted for {scope} (ATS default is TLS 1.2)"))
    if rules.get("NSExceptionRequiresForwardSecrecy") is False:
        out.append(("MED", f"forward secrecy not required for {scope}"))
for t in p.get("CFBundleURLTypes", []):
    for scheme in t.get("CFBundleURLSchemes", []):
        out.append(("INFO", f"custom URL scheme '{scheme}://': any app can claim it; use universal links for sensitive flows"))
if p.get("UIFileSharingEnabled"):
    out.append(("MED", "UIFileSharingEnabled: the app's Documents folder is visible in Files/Finder"))
for key, text in p.items():
    if key.endswith("UsageDescription") and len(text) < 20:
        out.append(("INFO", f"{key}: vague purpose string '{text}' (and is the permission needed at all?)"))
for sev, text in out:
    print(f"{sev:4} {text}")
HIGH NSAllowsArbitraryLoads = true: ATS is off for every connection
HIGH plain HTTP allowed to api.lab.test and subdomains
MED  TLSv1.0 accepted for api.lab.test and subdomains (ATS default is TLS 1.2)
INFO custom URL scheme 'labhome://': any app can claim it; use universal links for sensitive flows
MED  UIFileSharingEnabled: the app's Documents folder is visible in Files/Finder
INFO NSLocationAlwaysAndWhenInUseUsageDescription: vague purpose string 'Location.' (and is the permission needed at all?)

Two high findings undo ATS completely: NSAllowsArbitraryLoads disables it for every host, and the exception for api.lab.test allows plain HTTP and TLS 1.0 to the app's own API, which should be the most protected endpoint. The custom scheme and file sharing are design questions; the vague location string points to a permission that the app (which pairs over BLE and needs no location on iOS) probably doesn't need.

The fixed settings

xml
<key>NSAppTransportSecurity</key>
<dict>
  <!-- no keys: ATS defaults apply (HTTPS, TLS 1.2+, forward secrecy, valid certificates) -->
</dict>
<key>NSCameraUsageDescription</key><string>Scan the QR code on your LabHome device to pair it securely.</string>
<key>NSBluetoothAlwaysUsageDescription</key><string>Find and pair LabHome devices near you.</string>
<key>NSLocalNetworkUsageDescription</key><string>Control your LabHome hub directly on your home network.</string>

The API gets a proper TLS configuration on the server instead of an exception in the app; pairing links move to universal links; file sharing is off; location is removed.

How these flaws are detected

  • CI checks on the built app's Info.plist (the build can merge keys from targets and SDKs), like the program above; fail the build on NSAllowsArbitraryLoads or HTTP exceptions for your own domains.
  • Static analysis of the IPA (MobSF and similar tools list ATS exceptions, URL schemes and entitlements) (mobile app testing).
  • Server-side checks: if the app needs TLS 1.0 for an endpoint, the endpoint is the finding; scan it (service configuration review).
  • Dynamic tests with an intercepting proxy on a test device: any plain-HTTP request is visible immediately.

How it is fixed

  • Remove ATS exceptions; fix servers instead. Where an exception is truly needed (a third-party media host), scope it to that domain and document why.
  • Use universal links instead of custom schemes for anything carrying authorisation data.
  • Keep sensitive files out of Documents when file sharing is on, and use Data Protection (NSFileProtectionComplete) for files with secrets.
  • Request only permissions with a feature behind them, with clear purpose strings.

Pitfalls

  • An ATS exception added during development for a test server and shipped.
  • Believing ATS protects all networking: lower-level APIs and some third-party libraries bypass it.
  • Using a custom URL scheme to return OAuth authorisation codes without PKCE.

Practice

1. Remove NSAllowsArbitraryLoads from the plist but keep the exception domain. What does the checker report, and is the app safe now?

Plain HTTP and TLS 1.0 for api.lab.test and its subdomains remain: the app's own API traffic can still be read and changed. Remove the exception too, after fixing the server.

2. Why does ATS not help an app that implements its own TLS with a bundled library?

ATS is enforced by Apple's URL loading system. Connections made through other stacks never pass through it, so their certificate validation and TLS versions depend entirely on the library and its configuration.

3. Two apps on one phone both register labhome://. What can go wrong during pairing, and what is the fix?

The pairing link may open the other app, which then receives the pairing token. Universal links are bound to the developer's domain by a signed association file, so only the genuine app receives them; tokens should also be single-use and short-lived.

Test yourself

What does NSAllowsArbitraryLoads = true do?

  1. Enables pinning
  2. Turns App Transport Security off for all connections
  3. Allows Bluetooth
  4. Enables file sharing

Which minimum TLS version does ATS require by default?

  1. SSL 3.0
  2. TLS 1.0
  3. TLS 1.2
  4. TLS 1.3

Why are custom URL schemes risky for passing tokens?

  1. They are slow
  2. Any app can register the same scheme
  3. They require ATS
  4. They only work offline

Which statement about ATS coverage is true?

  1. It covers every socket
  2. It covers the URL loading system; lower-level or third-party networking can bypass it
  3. It covers only web views
  4. It covers only Bluetooth