# VNX-927: Implicit Intent broadcast that any app can receive

Reports an Android broadcast that any installed app can receive (CWE-927) in Java and Kotlin.

| Field | Value |
|---|---|
| Rule ID | `VNX-927` |
| Severity | Medium |
| SARIF level | `warning` |
| Kind | `sast` |
| Languages | Java, Kotlin |
| CWE | [CWE-927](https://cwe.mitre.org/data/definitions/927.html) |
| CAPEC | [CAPEC-66](https://capec.mitre.org/data/definitions/66.html) |
| ATT&CK | [T1190](https://attack.mitre.org/techniques/T1190/) |
| CWSS vector | `CWSS:1.0/TI:M/AP:RU/AL:S/IC:N/FC:LT/RP:RU/RL:S/AV:L/AS:N/IN:A/SC:A/BI:M/DI:H/EX:M/EC:N/P:C` |
| Tags | `use-of-implicit-intent` `android` `cwe-927` |
| Source | [`internal/sast/rules/vnx-927.rego`](https://github.com/Vulnesis/cli/blob/main/internal/sast/rules/vnx-927.rego) |

## Overview

Reports an Android broadcast that any installed app can receive (CWE-927) in Java and Kotlin: sendBroadcast(i) or sendOrderedBroadcast(i, null) with no receiver permission, where i is built a few lines above as an implicit Intent (new Intent(), new Intent("action") or new Intent(ACTION_CONSTANT), Kotlin Intent(...)) and no setPackage/setComponent/setClass/setClassName (or package/component assignment) makes it explicit before the send; the same call with the implicit Intent built inline; and every sendStickyBroadcast/sendStickyOrderedBroadcast, whose extras any app can read back. Not reported: a broadcast with a permission argument, explicit Intents (new Intent(context, Receiver.class) or one given a package or component), LocalBroadcastManager sends, comments and strings. Intents built in another method or passed in as a parameter are not followed.

## Why this matters

An implicit broadcast is delivered to every app that registers a matching intent filter. Session ids, tokens or personal data put in its extras are readable by any installed app, and a sticky broadcast stays readable after it is sent.

## What gets flagged

```
Intent update = new Intent("com.example.bank.BALANCE");
update.putExtra("balance", balance);
context.sendBroadcast(update);

sendBroadcast(new Intent("com.example.bank.SESSION").putExtra("sid", sessionId));
ctx.sendStickyBroadcast(status);
```

## What is not flagged

```
Intent i = new Intent("com.example.bank.BALANCE");
i.setPackage(context.getPackageName());
context.sendBroadcast(i);

context.sendBroadcast(new Intent(context, BalanceReceiver.class));
context.sendBroadcast(i, "com.example.permission.BANK");
LocalBroadcastManager.getInstance(ctx).sendBroadcast(i);
```

## Remediation

1. Make the Intent explicit with `setPackage`, `setComponent` or a class-based constructor.
2. Or pass a `signature`-level receiver permission to `sendBroadcast(intent, permission)`.
3. Do not use sticky broadcasts; they are deprecated and readable by any app.
4. For a confirmed false positive, add a `vulnetix-ignore: VNX-927` comment on the line.

## References

- [CWE-927](https://cwe.mitre.org/data/definitions/927.html)
- [Android: Security tips, broadcasts](https://developer.android.com/privacy-and-security/security-tips#broadcast-receivers)

## Suppressing this rule

Put a `nosec` comment on the line, or on line 1 to cover the whole file. Use the comment marker of the file's language (`#`, `//`, `--` or `;`):

```text
# nosec vnx-927
// nosec vnx-927
```

Or record an ignore rule: `vulnetix ignore add --rule vnx-927 --reason "..."`. See [Suppressing findings](/sast/guides/suppressing-findings.md).
