ZXIC/Sanechips ZX297520V3 BootROM Arbitrary Memory Write via USB Download Mode (CVE-2026-40003)
by rva3 (aka "Joselito"), with SoC reverse-engineering credit to Stefan Dösinger, fused-device testing by Mio Naganohara and exp-3 · 2026-07-05
- Severity
- High
- CVE
- CVE-2026-40003
- Category
- hardware
- Affected product
- ZXIC/Sanechips ZX297520V3 SoC BootROM (used in USB modem/baseband devices)
- Affected versions
- All SoC revisions prior to the March 2026 fix; no shipping products with the patched chip are known yet
- Disclosed
- 2026-07-05
- Patch status
- unpatched
Tags
References
Archive entry
intelseclab/poc-archiveMetadata
| Field | Value |
|---|---|
| Date Added | 2026-07-05 |
| Last Updated | 2026-05 |
| Author / Researcher | rva3 (aka “Joselito”), with SoC reverse-engineering credit to Stefan Dösinger, fused-device testing by Mio Naganohara and exp-3 |
| CVE / Advisory | CVE-2026-40003 |
| Category | hardware |
| Severity | High |
| CVSS Score | Not specified in source |
| Status | Weaponized |
| Tags | bootrom, usb-download-mode, socket-modem, zx297520v3, arbitrary-memory-write, embedded, baseband, reverse-engineering |
| Related | N/A |
Affected Target
| Field | Value |
|---|---|
| Software / System | ZXIC/Sanechips ZX297520V3 SoC BootROM (used in USB modem/baseband devices) |
| Versions Affected | All SoC revisions prior to the March 2026 fix; no shipping products with the patched chip are known yet |
| Language / Platform | Rust host-side loader tool + Rust thumbv6m (ARM Cortex-M0) payload, communicating with the device over USB |
| Authentication Required | Local-only (requires physical USB access and triggering USB download mode via a test point or corrupted flash) |
| Network Access Required | No |
Summary
The ZX297520V3 BootROM falls back to a USB download mode when it cannot load or verify a valid image from flash, entering a handshake loop that accepts a stage-1 image over USB for device recovery. The BootROM’s image-load command does not validate the destination address it is told to write to, allowing an attacker with physical USB access to write arbitrary data to arbitrary memory, including onto the boot stack. By further abusing the lack of any one-time-download restriction, the PoC sends a first payload to a chosen address, then overwrites the saved return address on the stack so that when image verification fails and verify_and_jump returns into usbdl_init, execution redirects into the attacker-controlled payload instead of normal error handling — achieving code execution on the BootROM before any anti-rollback/signature checks apply.
Vulnerability Details
Root Cause
Missing bounds/destination validation in the BootROM’s USB download command handler (opcode 0x7A): the handler accepts an arbitrary start_addr/size pair from the host and writes host-supplied bytes there without restricting the range to a safe scratch buffer, combined with no one-time-use restriction on the download command itself.
Attack Vector
- Trigger USB download mode on the target device (via a hardware test point or by corrupting the flash boot image).
- Send a first payload image to a chosen memory address using the USB download protocol.
- Compute the stack offset of the saved link register based on the
entry/usbdl_initfunction prologues (8 words in this BootROM build). - Send a second “image” whose content overwrites the saved
LRslot on the stack with the address of the attacker’s payload. - Send the jump/verify command and deliberately let image-magic verification fail.
verify_and_jumpreturns intousbdl_init, which executes itsPOP {R4, PC}epilogue — popping the attacker-controlled address intoPCand transferring control to the payload.
Impact
Arbitrary code execution in BootROM context on the ZX297520V3 SoC prior to any signature verification, enabling full compromise/unlock of the baseband/modem device via nothing more than physical USB access — with no software fix possible for chips already in the field (only newer silicon revisions are fixed).
Environment / Lab Setup
Target: Device with a ZX297520V3 SoC, USB download mode reachable via test point or corrupted flash
Attacker: Rust toolchain (rustup, thumbv6m-none-eabi target), llvm-objcopy, gcc, root/sudo for raw USB access
Proof of Concept
PoC Script
See
loader/src/main.rs(host-side USB loader/exploit) andpayload/src/main.rs(Cortex-M0 payload run on the BootROM) in this folder.
| |
After building the bare-metal payload, the loader tool is run with root privileges to access the USB device directly; with the target device held in USB download mode, the loader performs the handshake, uploads the payload to the chosen address, corrupts the saved stack return address to redirect execution into it, and triggers the verification-failure code path so the BootROM jumps into the payload — observable via UART output on the device.
Detection & Indicators of Compromise
Signs of compromise:
- Device entering USB download mode outside of an authorized service/recovery flow
- Unexpected payload execution evidenced by UART output diverging from the normal boot sequence
- Repeated USB image-download command sequences (opcode
0x7A) observed on the USB bus without a corresponding legitimate firmware-recovery session
Remediation
| Action | Detail |
|---|---|
| Primary fix | No vendor patch confirmed as of 2026-07-05 for chips already in the field — the issue is fixed only in SoC revisions manufactured since March 2026; monitor ZTE PSIRT advisories |
| Interim mitigation | Restrict physical/USB access to devices, disable or physically protect USB download-mode test points where feasible, and treat any device that enters download mode unexpectedly as potentially compromised |
References
Notes
Mirrored from https://github.com/rva3/CVE-2026-40003 on 2026-07-05.