Sensitive Data Exposed Through the Clipboard
Sensitive values can be copied to, or are placed on, the system clipboard, where other applications, keyboards and synchronised devices can read them.
| Severity | Low |
| CVSS 3.1 | 3.3 CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N Open in the calculator |
| CVSS 4.0 | 4.8 CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N Open in the calculator |
| CWE | CWE-200: Exposure of Sensitive Information to an Unauthorized Actor |
| OWASP Top 10 | A01:2025 Broken Access Control |
| MITRE ATT&CK | T1115 Clipboard Data |
| Category | Information Disclosure |
Description
The application allows sensitive values, such as passwords, one-time codes, account or card numbers and recovery phrases, to be copied from its fields, or places them on the clipboard itself through copy buttons, without limiting how long they stay there or where they can go. The clipboard is shared across the device: on Android the keyboard in use and the application in the foreground can read it, and on iOS the application in the foreground can request its contents. Apple's Universal Clipboard can also make copied content available on the user's other nearby Apple devices, and clipboard managers and keyboards with a clipboard history may keep copies.
A malicious application the user opens, a malicious or compromised keyboard, or a clipboard history feature can therefore obtain values the user copied, which may include credentials or one-time codes that give access to the account, or recovery phrases that give control of funds. Current versions of both platforms restrict reading by background applications and alert the user when an application reads content copied elsewhere, but the keyboard and an application in the foreground can still obtain it, a copied value stays on the clipboard until it is replaced unless an expiry is set, and copied values may also appear in the clipboard preview that recent Android versions display. Exploitation needs a malicious application or keyboard on the device, or access to a synchronised device, and the user must first copy the value, so the risk is low for most applications.
The weakness is identified by attempting to copy from each sensitive field, by reviewing the application's use of the clipboard APIs, and by monitoring the clipboard while the application is used, for example with objection's android clipboard monitor and ios pasteboard monitor commands.
Remediation
Keep sensitive values off the clipboard, and limit their exposure where copying is a deliberate feature:
- Use password input types for secrets (
textPasswordon Android,isSecureTextEntryon iOS), which do not allow their contents to be copied. For other sensitive fields, remove the copy and cut actions, for example with a custom selection action mode callback on Android or by overridingcanPerformAction(_:withSender:)on iOS. - Where the application offers a copy button for a sensitive value, mark the content as sensitive on Android with
ClipDescription.EXTRA_IS_SENSITIVEso that the clipboard preview hides it, and clear it withclearPrimaryClip()once it is no longer needed. - On iOS, write such values with the
localOnlyoption, which keeps them off Universal Clipboard, and anexpirationDate, so that they are removed automatically. - Do not offer copying for recovery phrases and other long-term secrets.
Confirm the fix by attempting to copy from each sensitive field, and by monitoring the clipboard while using the application's copy features.
References
Add This Finding to Your Library
In Pental this write-up is in Settings, Library. Add to my library copies it into your own, rated in your firm's CVSS version, ready to put in your own words.
Free trialYour trial starts when your portal goes live, not when you sign up, so the time you spend setting up does not count. · No card required
Only need the reporting? Our reporting tool is free and open source, with the same library.