medium · M9 · MASVS-STORAGE-2 · PTKD-STO-FILESHARING
iTunes file sharing enabled
UIFileSharingEnabled exposes the app's Documents directory over USB / Finder.
How it is exploited
UIFileSharingEnabled exposes the app's Documents directory in Finder/iTunes. Anyone with the unlocked device on a computer browses and copies whatever the app stored there.
Why it matters
Files assumed private (exports, caches, databases placed in Documents) are user-visible and trivially extracted.
How to fix it
- Disable file sharing unless the feature is deliberate.
- Keep sensitive files out of Documents; use Application Support with NSFileProtectionComplete and the Keychain for secrets.
Does your app have this?
PTKD checks your build or your source project for PTKD-STO-FILESHARING and every other check in this knowledge base.
Scan your appReferences
Related checks (M9)
- Android file or preferences created world-readable or world-writable
- Public Supabase bucket can be listed by anyone
- Public Supabase storage bucket (heuristic)
- Sensitive data written to external storage
- Sensitive data written to the log
- Secret written to device storage
- Tokens or passwords stored in plain app preferences
- Keychain item accessible while locked