CWE-926: Improper Export of Android Application Components

Description

The Android application exports a component for use by other applications, but does not properly restrict which applications can launch the component or access the data it contains.

Submission Date :

July 2, 2013, midnight

Modification Date :

2023-06-29 00:00:00+00:00

Organization :

MITRE
Extended Description

The attacks and consequences of improperly exporting a component may depend on the exported component:

  • If access to an exported Activity is not restricted, any application will be able to launch the activity. This may allow a malicious application to gain access to sensitive information, modify the internal state of the application, or trick a user into interacting with the victim application while believing they are still interacting with the malicious application.
  • If access to an exported Service is not restricted, any application may start and bind to the Service. Depending on the exposed functionality, this may allow a malicious application to perform unauthorized actions, gain access to sensitive information, or corrupt the internal state of the application.
  • If access to a Content Provider is not restricted to only the expected applications, then malicious applications might be able to access the sensitive data. Note that in Android before 4.2, the Content Provider is automatically exported unless it has been explicitly declared as NOT exported.

Example Vulnerable Codes

Example - 1

This application is exporting an activity and a service in its manifest.xml:


// ...// 

<action android:name="com.example.vulnerableApp.OPEN_UI" /><category android:name="android.intent.category.DEFAULT" />
// ...// 
<intent-filter></intent-filter>

// ...// 
<action android:name="com.example.vulnerableApp.START_BACKGROUND" />
// ...// 
<intent-filter></intent-filter><activity android:name="com.example.vulnerableApp.mainScreen"></activity><service android:name="com.example.vulnerableApp.backgroundService"></service>

Because these components have intent filters but have not explicitly set 'android:exported=false' elsewhere in the manifest, they are automatically exported so that any other application can launch them. This may lead to unintended behavior or exploits.

Example - 2

This application has created a content provider to enable custom search suggestions within the application:


android:name="com.example.vulnerableApp.searchDB"android:authorities="com.example.vulnerableApp.searchDB"><provider></provider>

Because this content provider is only intended to be used within the application, it does not need to be exported. However, in Android before 4.2, it is automatically exported thus potentially allowing malicious applications to access sensitive information.

Related Weaknesses

This table shows the weaknesses and high level categories that are related to this weakness. These relationships are defined to give an overview of the different insight to similar items that may exist at higher and lower levels of abstraction.

Visit http://cwe.mitre.org/ for more details.

© cvefeed.io
Latest DB Update: Nov. 13, 2024 0:58