Description
The Android application uses an implicit intent for transmitting sensitive data to other applications.
Since an implicit intent does not specify a particular application to receive the data, any application can process the intent by using an Intent Filter for that intent. This can allow untrusted applications to obtain sensitive data. There are two variations on the standard broadcast intent, ordered and sticky. Ordered broadcast intents are delivered to a series of registered receivers in order of priority as declared by the Receivers. A malicious receiver can give itself a high priority and cause a denial of service by stopping the broadcast from propagating further down the chain. There is also the possibility of malicious data modification, as a receiver may also alter the data within the Intent before passing it on to the next receiver. The downstream components have no way of asserting that the data has not been altered earlier in the chain. Sticky broadcast intents remain accessible after the initial broadcast. An old sticky intent will be broadcast again to any new receivers that register for it in the future, greatly increasing the chances of information exposure over time. Also, sticky broadcasts cannot be protected by permissions that may apply to other kinds of intents. In addition, any broadcast intent may include a URI that references data that the receiving component does not normally have the privileges to access. The sender of the intent can include special privileges that grant the receiver read or write access to the specific URI included in the intent. A malicious receiver that intercepts this intent will also gain those privileges and be able to read or write the resource at the specified URI.
Potential Impact
Confidentiality
Read Application Data
Integrity
Varies by Context
Demonstrative Examples
Intent intent = new Intent();intent.setAction("com.example.CreateUser");intent.putExtra("Username", uname_string);intent.putExtra("Password", pw_string);sendBroadcast(intent);IntentFilter filter = new IntentFilter("com.example.CreateUser");MyReceiver receiver = new MyReceiver();registerReceiver(receiver, filter);Intent intent = new Intent();intent.setAction("com.example.service.UserExists");intent.putExtra("Username", uname_string);sendStickyBroadcast(intent);IntentFilter filter = new IntentFilter("com.example.service.UserExists");MyReceiver receiver = new MyReceiver();registerReceiver(receiver, filter);Intent intent = new Intent();intent.setAction("com.example.OpenURL");intent.putExtra("URL_TO_OPEN", url_string);sendOrderedBroadcastAsUser(intent);public class CallReceiver extends BroadcastReceiver {@Overridepublic void onReceive(Context context, Intent intent) {String Url = intent.getStringExtra(Intent.URL_TO_OPEN);attackURL = "www.example.com/attack?" + Url;setResultData(attackURL);}}Intent intent = new Intent();intent.setAction("com.example.BackupUserData");intent.setData(file_uri);intent.addFlags(FLAG_GRANT_READ_URI_PERMISSION);sendBroadcast(intent);public class CallReceiver extends BroadcastReceiver {@Overridepublic void onReceive(Context context, Intent intent) {Uri userData = intent.getData();stealUserData(userData);}}Mitigations & Prevention
If the application only requires communication with its own components, then the destination is always known, and an explicit intent could be used.
Detection Methods
- Automated Static Analysis High — 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 sea
Real-World CVE Examples
| CVE ID | Description |
|---|---|
| CVE-2022-4903 | An Android application does not use FLAG_IMMUTABLE when creating a PendingIntent. |
Related Weaknesses
Frequently Asked Questions
What is CWE-927?
CWE-927 (Use of Implicit Intent for Sensitive Communication) is a software weakness identified by MITRE's Common Weakness Enumeration. It is classified as a Variant-level weakness. The Android application uses an implicit intent for transmitting sensitive data to other applications.
How can CWE-927 be exploited?
Attackers can exploit CWE-927 (Use of Implicit Intent for Sensitive Communication) to read application data. This weakness is typically introduced during the Architecture and Design phase of software development.
How do I prevent CWE-927?
Key mitigations include: If the application only requires communication with its own components, then the destination is always known, and an explicit intent could be used.
What is the severity of CWE-927?
CWE-927 is classified as a Variant-level weakness (Low-Medium abstraction). It has been observed in 1 real-world CVEs.