Mobile application security

Private mobile data exposed in notifications

Private mobile data exposed in notifications: phone, document, eye arranged to illustrate private mobile data exposed in notifications.

Notifications are often visible while the device is locked or another person is nearby. Understanding private mobile data exposed in notifications helps establish which security property the feature needs and where that property is actually enforced.

What does this involve?

Browser security is influenced by origins, embedded content, messaging and the way returned data is interpreted. A server can make a correct decision while client-side code later exposes the result to an unintended page or execution context.

On Android 13 and higher, apps targeting API level 33 or above must request the runtime permission POST_NOTIFICATIONS to send notifications. Below API level 33, this permission is not required. For testing purposes, we consider the value of the app's minSdkVersion because it indicates the lowest Android version on which the app can run.

Why minSdkVersion and not targetSdkVersion?: Using minSdkVersion ensures the test accounts for the least secure environment in which the app can operate, which is what determines the real exposure risk.

Why it matters

Consider a realistic failure: a private message preview exposes sensitive information on the lock screen.

A browser trust failure can affect signed-in users, private responses or actions taken with a user's session. The assessment should identify the relevant browser behaviour and the server-side permissions that remain in force.

Mobile behaviour can change between a fresh installation, an authenticated session, background activity and a device migration. The assessment needs the actual release and representative supported device states.

How penetration testers check for it

Inspect foreground, background and locked-device notification behaviour.

  • a list of locations where notification APIs are used.
  • minSdkVersion is 33 or higher and the POST_NOTIFICATIONS permission is declared in the manifest file, or.
  • minSdkVersion is 32 or lower, regardless of whether the POST_NOTIFICATIONS permission is declared.
  • Trace untrusted data into rendering and navigation.
  • Check credentialed requests and sensitive state changes.

How to fix it

Use privacy-conscious notification content and respect platform and user visibility settings.

  • Keep trusted and untrusted content in appropriate contexts.
  • Use safe rendering and precisely scoped browser policies.
  • Validate messaging origins and intended recipients.
  • Retain independent server-side identity and permission checks.

A policy finding needs application context. The absence of a particular header or browser feature is not, by itself, proof that protected data can be accessed.

Recheck the changed behaviour against the original failure conditions and the legitimate user journey. Keep enough evidence to show which release and configuration were verified, and include related entry points that depend on the same security decision.

Read about our methodology or contact pentested.com to discuss your mobile applications.

See your first test report this week.

Book a 30 minute demo. We will verify one of your targets with you and run a test against it, so you can judge the results on your own systems.

Book a demo