## https://sploitus.com/exploit?id=20557F2C-42AE-5B1F-BCF0-6B6EBE49885A
# CVE-2026-0073 β Android ADBD TLS Authentication Bypass
### `EVP_PKEY_cmp()` Type Confusion β Unauthorized ADB Shell Access
[](https://python.org)
[](https://vulners.com/cve/CVE-2026-0073)
[](https://android.com)
[](License)
---
## π₯ Overview
There is a **critical authentication bypass** vulnerability in the Android ADB daemon (`adbd`), allowing any attacker on the local network to obtain **full shell** access to the target device**, **without requiring user authorization**. The vulnerability resides in the `adbd_tls_verify_cert()` function in the `daemon/auth.cpp` file, where `EVP_PKEY_cmp()` is used as a boolean value. When the stored key is a **RSA** key, and the provided TLS client certificate contains a **non-RSA key** (e.g., EC P-256 or Ed25519), `EVP_PKEY_cmp()` returns **-1** (type mismatch), which is considered **true** in **C/C++**. Thus, `authorized = true`.
Example:
```c
// Vulnerable code snippet in daemon/auth.cpp
if (EVP_PKEY_cmp(peer_key, stored_key)) { // β BUG: -1 is true! Authorized = true;
}
```
| `EVP_PKEY_cmp()` Return Value | Meaning | True in C? | Result |
| --- | --- | --- | --- |
| `1` | Key matches | β | Authorized (correct) |
| `0` | Keys differ | β | Denied (correct) |
| `-1` | Type mismatch | **β ** | Authorized (buggy) |
---
## β‘ Quick Start
### Install Dependencies
```bash
pip install cryptography
```
### Run the Exploit
```bash
# Interactive shell
python adb_tls_auth_bypass.py
# Single command execution
python adb_tls_auth_bypass.py 192.168.1.42 37521 --cmd "id"
# Detailed mode (view full protocol trace)
python adb_tls_auth_bypass.py 192.168.1.42 37521 -v --cmd "id"
```
### Force Use Specific Key Types
```bash
python adb_tls_auth_bypass.py 192.168.1.42 5555 --key-type ec
python adb_tls_auth_bypass.py 192.168.1.42 5555 --key-type ed25519
```
> By default, the script will automatically try **EC P-256 β Ed25519 β EC/TLS 1.2** until success. ---
## π― Exploitation Process
```
Attacker targets the adbd process
β
βββββ TCP connection βββββββββββββββββββΊβ
βββββ CNXN (plaintext) ββββββββββββββΊβ
βββββ STLS (TLS upgrade request)βββ
βββββ STLS reply βββββββββββββββββββΊβ
β
βββββ TLS 1.3 handshake βββββββββββββ
β (EC P-256 client certificate submitted)β
```
β EVP_PKEY_cmp(EC, RSA) β -1 β
β -1 is true β authorized=true β
ββββββββββββββββββββββββββββββββββββββ
β β
βββββ CNXN (Device Information)βββββββββββ
βββββ Open βshell:β ββββββββββββββββΊβ
βββββ Okay βββββββββββββββββββββββββ
βββββΊ WRTE/OKAY (Shell I/O)βββββββΊβ
β β
γFull Shell Accessγ`
---
## π Prerequisites
| Requirement | Details |
|---|---|
| **Developer Options** | Enabled on the target device |
| **Wireless Debugging** | Enabled (or using ADB via TCP port 5555) |
| **Stored RSA Key** | The device must have been paired at least once via USB (`/data/misc/adb/adb_keys`) |
| **Network Access** | The attacker must have access to the adbd TCP port |
β οΈ **Note:** The RSA key must be located in the `/data/misc/adb/adb_keys` file. This file is populated through **USB debugging pairing** (accepting the βAllow USB debugging?β dialog). Wireless debugging pairing (`adb pair`) stores the key in a **different location** (`adb_known_hosts.pb`), thus it does not meet this requirement. ---
## π‘οΈ Affected Versions
- **Android 14** (AOSP) β β Vulnerability confirmed
- **Android 15** (AOSP) β Vulnerabilities may exist in unpatched versions
- Versions from different manufacturers may vary (e.g., Samsung One UI, Pixel, etc.). ### How to check patch level
```bash
adb shell getprop ro.build.version.security_patch
```
---
## π§ͺ Test Environment
Tested to work correctly on the following devices:
```
Kernel: 6.1.23-android14-4-00257-g7e35917775b8-ab9964412
Platform: Android 14 (Android Studio emulator)
```
---
## π§ Improvements over the original version
This branch includes the following improvements:
- β **Multi-key fallback** β Automatically tries EC P-256 β Ed25519 β EC/TLS 1.2
- β **Ed25519 Support** β Provides a more widely compatible alternative key type
- β **TLS 1.2 Fallback** β Different client certificate processes (sent during handshake vs. after handshake)
- β **Enhanced Certificates** β Correct X.509 extensions (BasicConstraints, KeyUsage)
- β **Windows Compatibility** β Uses thread I/O instead of `select()` for cross-platform support
- β **Increased Timeout** β Provides higher reliability on slower networks
- β **Detailed Diagnostic Information** β Displays detailed protocol trace information with the `-v` flag
---
## π Project Structure
```
CVE-2026-0073-Android-ADBD-bypass-POC/
βββ adb_tls_auth_bypass.py # Main vulnerability exploitation script
βββ README.md # This file
```
---
## β οΈ Disclaimer
This tool is intended only for **authorized security testing and education purposes**. Unauthorized access to computer systems is illegal. Please obtain proper authorization before testing. The author assumes no responsibility for misuse of this software. ---
## π References
- [CVE-2026-0073 β MITRE](https://vulners.com/cve/CVE-2026-0073)
- [Android Security Bulletins](https://source.android.com/docs/security/bulletin)
- [OpenSSL `EVP_PKEY_cmp` Documentation](https://www.openssl.org/docs/man3.0/man3/EVP_PKEY_cmp.html)
- [ADB Protocol Reference](https://android.googlesource.com/platform/packages/modules/adb/+/refs/heads/main/protocol.txt)
---
**If this helps you, please give it a like β**