medium · M9 · MASVS-STORAGE-1 · PTKD-DYN-LOG-SENSITIVE
Sensitive data written to the log
A credential or PII value appeared in logcat, where other apps (pre-Android 4.1) or a connected host can read it.
How it is exploited
Sensitive values were written to the system log. Other processes with log access, connected computers (adb logcat), and crash-reporting pipelines all see them; logs also persist in bug reports users share.
Why it matters
Tokens and personal data leak through a channel nobody audits as data storage.
How to fix it
- Strip or gate logging: no secrets or PII at any level; use ProGuard/R8 to remove Log.d/v in release.
- Route diagnostics through a logger that redacts known-sensitive keys by default.
Does your app have this?
PTKD checks your build or your source project for PTKD-DYN-LOG-SENSITIVE 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
- Secret written to device storage
- Tokens or passwords stored in plain app preferences
- Keychain item accessible while locked
- Tokens or passwords written to the device log