1835
Scope Impact Likelihood
Integrity Modify Application Data
Other applications, possibly untrusted, can read or modify
the data that is offered by the Content Provider.
Detection Methods
Automated Static Analysis
Automated static analysis, commonly referred to as Static Application Security Testing (SAST),
can find some instances of this weakness by analyzing source code (or binary/compiled code)
without having to execute it. Typically, this is done by building a model of data flow and control
flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input)
with "sinks" (destinations where the data interacts with external components, a lower layer such
as the OS, etc.)
Effectiveness = High
Potential Mitigations
Phase: Build and Compilation
Strategy = Attack Surface Reduction
If they do not need to be shared by other applications, explicitly mark components with
android:exported="false" in the application manifest.
Phase: Build and Compilation
Strategy = Attack Surface Reduction
If you only intend to use exported components between related apps under your control, use
android:protectionLevel="signature" in the xml manifest to restrict access to applications signed
by you.
Phase: Build and Compilation
Phase: Architecture and Design
Strategy = Attack Surface Reduction
Limit Content Provider permissions (read/write) as appropriate.
Phase: Build and Compilation
Phase: Architecture and Design
Strategy = Separation of Privilege
Limit Content Provider permissions (read/write) as appropriate.
Demonstrative Examples
Example 1:
This application is exporting an activity and a service in its manifest.xml:
Example Language: XML (Bad)
<activity android:name="com.example.vulnerableApp.mainScreen">
...
<intent-filter>
<action android:name="com.example.vulnerableApp.OPEN_UI" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
...
</activity>
<service android:name="com.example.vulnerableApp.backgroundService">
...
<intent-filter>
CWE Version 4.14
CWE-927: Use of Implicit Intent for Sensitive Communication
CWE-927: Use of Implicit Intent for Sensitive Communication