iOS-Specific Vulnerability Reference
1. Keychain Misconfigurations (MASVS-STORAGE-1)
| Flag | Severity |
|---|---|
kSecAttrAccessibleAlways |
CRITICAL |
kSecAttrAccessibleAlwaysThisDeviceOnly |
HIGH |
kSecAttrAccessibleAfterFirstUnlock |
MEDIUM |
kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly |
MEDIUM |
kSecAttrAccessibleWhenUnlocked |
LOW |
kSecAttrAccessibleWhenPasscodeSetThisDeviceOnly |
BEST |
Missing kSecAttrAccessControl on sensitive items (tokens, keys) = finding. |
2. Data Protection Classes (MASVS-STORAGE-2)
NSFileProtectionComplete— expected for sensitive files.NSFileProtectionCompleteUntilFirstUserAuthentication— acceptable for many cases but persists post-boot.NSFileProtectionCompleteUnlessOpen— fine for files held open across lock.NSFileProtectionNone— vulnerable for sensitive data.
3. IPC Vulnerabilities (MASVS-PLATFORM)
- URL Scheme hijacking — attacker app claims the same scheme; without Universal Links the OS may route to the wrong app.
- Universal Links — validate
apple-app-site-associationJSON; missingpathsallowlist widens attack. - App Extensions — shared
NSUserDefaults/ App Group containers may leak across extensions. - Custom pasteboards — prefer named pasteboard over general.
4. Binary Protections (MASVS-CODE)
Expect all of: PIE, ARC, stack canaries, code signing valid, (App Store) encrypted. Missing any → lower-severity finding with cumulative scoring.
5. ATS & Network (MASVS-NETWORK)
NSAllowsArbitraryLoads=YES, per-domain insecure exceptions, TLS < 1.2, no pinning for highly sensitive apps.
6. Logging & Backup (MASVS-STORAGE / PRIVACY)
NSLogof tokens/PII in release.- Files in
Documents/withoutskipBackupattribute may reach iCloud. - Crash reports may contain sensitive stack state — strip via CocoaLumberjack formatter / Sentry scrubbers.
References
- OWASP MASTG: https://mas.owasp.org/MASTG/
- OWASP MASVS v2: https://mas.owasp.org/MASVS/
- Apple: https://developer.apple.com/documentation/security
- Apple Data Protection: https://support.apple.com/guide/security/data-protection-overview-secf6276da8a/web