Common Weakness Enumeration

A Community-Developed List of Software Weakness Types

CWE/SANS Top 25 Most Dangerous Software Errors
Home > CWE List > CWE- Individual Dictionary Definition (2.11)  

CWE-925: Improper Verification of Intent by Broadcast Receiver

Weakness ID: 925
Abstraction: Variant
Status: Incomplete
Presentation Filter:
+ Description

Description Summary

The Android application uses a Broadcast Receiver that receives an Intent but does not properly verify that the Intent came from an authorized source.

Extended Description

Certain types of Intents, identified by action string, can only be broadcast by the operating system itself, not by third-party applications. However, when an application registers to receive these implicit system intents, it is also registered to receive any explicit intents. While a malicious application cannot send an implicit system intent, it can send an explicit intent to the target application, which may assume that any received intent is a valid implicit system intent and not an explicit intent from another application. This may lead to unintended behavior.

+ Alternate Terms
Intent Spoofing
+ Time of Introduction
  • Architecture and Design
+ Applicable Platforms



Architectural Paradigms

Mobile Application

+ Common Consequences

Technical Impact: Gain privileges / assume identity

Another application can impersonate the operating system and cause the software to perform an unintended action.

+ Demonstrative Examples

Example 1

(Bad Code)
Example Language: XML 
<manifest package="com.example.vulnerableApplication">
<receiver android:name=".ShutdownReceiver">
<action android:name="android.intent.action.ACTION_SHUTDOWN" />

The ShutdownReceiver class will handle the intent:

(Bad Code)
Example Language: Java 
IntentFilter filter = new IntentFilter(Intent.ACTION_SHUTDOWN);
BroadcastReceiver sReceiver = new ShutDownReceiver();
registerReceiver(sReceiver, filter);
public class ShutdownReceiver extends BroadcastReceiver {
public void onReceive(final Context context, final Intent intent) {

Because the method does not confirm that the intent action is the expected system intent, any received intent will trigger the shutdown procedure, as shown here:

Example Language: Java 
window.location = examplescheme://method?parameter=value

An attacker can use this behavior to cause a denial of service.

+ Potential Mitigations

Phase: Architecture and Design

Before acting on the Intent, check the Intent Action to make sure it matches the expected System action.

+ Relationships
NatureTypeIDNameView(s) this relationship pertains toView(s)
ChildOfWeakness ClassWeakness Class923Improper Restriction of Communication Channel to Intended Endpoints
Development Concepts (primary)699
Research Concepts (primary)1000
+ References
[REF-35] Erika Chin, Adrienne Porter Felt, Kate Greenwood and David Wagner. "Analyzing Inter-Application Communication in Android". 3.2.1. <>.
+ Maintenance Notes

This entry will be made more comprehensive in later CWE versions.

+ Content History
Submission DateSubmitterOrganizationSource
2013-06-24MITREInternal CWE Team
Modification DateModifierOrganizationSource
2014-02-18CWE Content TeamMITREInternal
updated Alternate_Terms, Demonstrative_Examples, Description, References

More information is available — Please select a different filter.
Page Last Updated: May 05, 2017