Sensitive Data in Crash Reports
sensitive_data_in_crash_reports EASY
| Category | Insecure Data Storage |
| OWASP Mobile (2024) | M9 |
| MASVS | MASVS-STORAGE-1MASVS-PRIVACY-1 |
| MASWE | MASWE-0005 |
| CWE | CWE-200CWE-532CWE-201 |
| Platform | AndroidiOS |
| Platform notes | Crashlytics/Sentry/os_log crash diagnostics and native tombstones/.ips reports. |
Description
Secrets, tokens, PII, or full request/response bodies survive into crash / diagnostic reports (Crashlytics/Sentry breadcrumbs, exception messages, attached state, native tombstones) that are written locally and shipped to a third-party crash service, exposing data the developer assumed stayed in memory. Distinct from ordinary logging: the crash pipeline captures and EXFILTRATES app state on failure. The secure path scrubs/allowlists crash payloads.
How it works
When the app crashes, the diagnostics pipeline snapshots the current application state and recent breadcrumbs, then ships that report to a third-party crash service. Developers assume the auth token, the password, and the last request body only ever lived in memory, but the crash reporter captures and exfiltrates exactly that state on failure. The raw crash report (stack trace, breadcrumbs, token/PII) is emitted to the system log and the evidence sink, so the system-log reader (adb logcat on Android, idevicesyslog/Console on iOS) captures exactly what a real crash upload would have shipped. The secure path allowlists non-sensitive fields, redacts tokens/PII, and drops request/response bodies before uploading.
How to exercise it. DVMA is the harness - open this module from the home index and tap the demo action. The screen ships the malicious input and simulates the attacker (e.g. the companion app, crafted intent, or scanned payload) in-process, and the evidence panel prints the proof. The Tools (optional) and Attack inputs below are only needed to reproduce the exploit end-to-end on a real device.
Exploit steps
- Set up. Build DVMA with a flavor that enables the Insecure Data Storage category (e.g.
--dart-define-from-file=config/flavors/dev.json) and run on an emulator/simulator you control. The demo needs no external tooling; for the optional on-device reproduction the relevant tools are:mitmproxy· Android:adb logcat· iOS:Console.app,idevicesyslog. - Locate the target. From the home index, open Sensitive Data in Crash Reports (
sensitive_data_in_crash_reports). The How it works section above describes this module’s specific weakness; the screen states the intended-secure behavior and exposes the vulnerable action. - Exploit. Exercise the flow that persists data, then inspect on-device storage (
adb shell run-as <pkg>/ pull the app sandbox, orobjection’sandroid keystore/ios nsuserdefaultshelpers) and confirm the sensitive value is present in cleartext or without hardware backing. - Observe the evidence. Trigger the vulnerable action and read the evidence panel - it prints the concrete proof (leaked value, accepted replay, executed payload, or unauthorized result).
- Contrast with the secure path. Run the module’s secure/hardened action (where provided) and confirm the same attack is rejected - this is what a correct implementation should do.
Tools (optional)
Android
iOS
Attack inputs
Payloads/artifacts you author for the on-device attack. The demo already ships and simulates these in-process (e.g. the malicious companion app / crafted intent is emulated inside the screen), so you only need to craft them to reproduce the exploit on a real device:
triggered crash
Real-world references
Concrete public disclosures that match this vulnerability class: