Skip to content

Conversation

@Sec0xEd
Copy link

@Sec0xEd Sec0xEd commented Dec 18, 2025

Summary

Add FLAG_IMMUTABLE to PendingIntents in ActionServiceImpl and UIIntentsImpl to prevent potential PendingIntent hijacking attacks.

Problem

Two PendingIntents were created with FLAG_UPDATE_CURRENT alone, without specifying mutability:

  • ActionServiceImpl.makeStartActionPendingIntent()
  • UIIntentsImpl.getPendingIntentForLowStorageNotifications()
    Starting from Android 12, apps must explicitly specify the mutability of PendingIntents. Without FLAG_IMMUTABLE, a malicious app could potentially modify the PendingIntent before it's delivered, leading to:
  • Intent redirection attacks
  • Data tampering
  • Privilege escalation

Solution

Added FLAG_IMMUTABLE to both PendingIntents since they:

  • Don't require fill-in data from the OS
  • Launch fixed activities/broadcasts
  • Don't need modification by external apps

Add FLAG_IMMUTABLE to PendingIntents in ActionServiceImpl and
UIIntentsImpl to prevent potential PendingIntent hijacking attacks.
Starting from Android 12, PendingIntents should specify mutability
explicitly. These PendingIntents don't require modification by
external apps, so FLAG_IMMUTABLE is the appropriate choice.
References:
- https://developer.android.com/reference/android/app/PendingIntent#FLAG_IMMUTABLE
- https://developer.android.com/about/versions/12/behavior-changes-12#pending-intent-mutability
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant