CVE-2023-21187

7.8 HIGH

📋 TL;DR

This vulnerability allows an attacker to bypass the Android Setup Wizard through a logic error in USB accessory handling, potentially gaining elevated privileges without user interaction. It affects Android 13 devices, particularly those running vulnerable Pixel builds.

💻 Affected Systems

Products:
  • Android
  • Google Pixel devices
Versions: Android 13
Operating Systems: Android
Default Config Vulnerable: ⚠️ Yes
Notes: Specifically affects Pixel devices with vulnerable builds; other Android 13 devices may also be affected depending on manufacturer implementations.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

An attacker could gain full control of the device, access sensitive data, install malware, or persist access through privilege escalation.

🟠

Likely Case

Local attackers could bypass security restrictions, access restricted system functions, or install unauthorized applications.

🟢

If Mitigated

With proper patching, the vulnerability is eliminated; without patching, device isolation and restricted USB access reduce risk.

🌐 Internet-Facing: LOW - This is a local privilege escalation requiring physical or USB access to the device.
🏢 Internal Only: MEDIUM - Internal attackers with physical or USB access could exploit this to bypass device security controls.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Exploitation requires USB access to the device and knowledge of the vulnerability; no user interaction needed once access is obtained.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Android Security Update June 2023 or later

Vendor Advisory: https://source.android.com/security/bulletin/pixel/2023-06-01

Restart Required: Yes

Instructions:

1. Go to Settings > System > System update. 2. Check for and install the June 2023 Android security update. 3. Restart the device after installation completes.

🔧 Temporary Workarounds

Disable USB debugging and developer options

android

Prevents unauthorized USB connections that could be used to trigger the vulnerability.

Settings > System > Developer options > Toggle off 'Developer options'

Restrict USB access

android

Limit USB connections to trusted devices only and disable USB file transfer when not needed.

Settings > Connected devices > USB > Select 'Charging only' or 'No data transfer'

🧯 If You Can't Patch

  • Physically restrict USB port access to prevent unauthorized connections
  • Implement device management policies that disable USB debugging and developer options

🔍 How to Verify

Check if Vulnerable:

Check Android version and security patch level in Settings > About phone > Android version and Security update level.

Check Version:

adb shell getprop ro.build.version.security_patch

Verify Fix Applied:

Verify the security patch level is June 2023 or later in Settings > About phone > Security update level.

📡 Detection & Monitoring

Log Indicators:

  • Unusual USB accessory connection attempts during setup wizard
  • Unexpected activity in UsbAccessoryUriActivity

Network Indicators:

  • Not applicable - local exploit only

SIEM Query:

Not applicable for typical SIEM monitoring as this is a local device exploit

🔗 References

📤 Share & Export