Java: CWE-927 - Query to detect the use of implicit PendingIntents #6779
+1,158
−1
Conversation
|
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.


This PR introduces a query that detects the issue described below.
Take into account that this depends on some CSV models that will need to be removed once #6397 and #6599 are merged. See
ImplicitPendingIntents.qllfor details.Description
A
PendingIntentdescribes an action in the form of an Intent that is intended to be given and executed at a later time by another application. The Intent wrapped by aPendingIntentis executed on behalf of the application that created it, and with its same privileges.If a
PendingIntentis configured to be mutable, the fields of its internal Intent can be changed by the receiving application if they were not previously set. This means that a mutablePendingIntentthat has not defined a destination component (that is, an implicitPendingIntent) can be directed to any component by the receiving application, and execute an arbitrary action with the privileges of the application that created it.If an implicit
PendingIntentis wrapped and sent as an extra of an Intent that can be intercepted (that is, again, an implicit Intent), any malicious application could obtain thePendingIntent, modify the underlying Intent with an arbitrary destination component, and execute the desired action with elevated privileges. This could give the malicious application access to private components of the victim application, or the ability to perform actions without having the necessary permissions.References
The text was updated successfully, but these errors were encountered: