Clipboard Leakage of Sensitive Fields
clipboard_leakage EASY
| Category | Insecure Data Storage |
| OWASP Mobile (2024) | M9 |
| MASVS | MASVS-STORAGE-2 |
| MASWE | MASWE-0030 |
| MASTG (v2 tests) | iOSMASTG-TEST-0276MASTG-TEST-0277MASTG-TEST-0278MASTG-TEST-0279MASTG-TEST-0280AndroidNone published |
| CWE | CWE-200 |
| Platform | AndroidiOS |
Description
Copies passwords/tokens to the global clipboard readable by any app.
How it works
The password or token is copied to the shared system clipboard with no sensitivity flag and no auto-clear. On Android any app can read the clipboard (pre-10) or it appears in clipboard history; on iOS it is exposed to the universal pasteboard. Secrets should never touch the global clipboard.
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:objection,frida· Android:adb· iOS:idb,idevicesyslog. - Locate the target. From the home index, open Clipboard Leakage of Sensitive Fields (
clipboard_leakage). 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.
- Map it back. Cross-reference the MASTG v2 test(s) MASTG-TEST-0276, MASTG-TEST-0277, MASTG-TEST-0278, MASTG-TEST-0279, MASTG-TEST-0280 for the canonical procedure and remediation.
Tools (optional)
Android
iOS
Real-world references
Concrete public disclosures that match this vulnerability class: