Bitdefender BOX 2 bootstrap update_setup command execution vulnerability
The update_setup API in the bootstrap firmware of Bitdefender BOX 2 does not hold a lock during firmware signature verification, allowing a race condition where an attacker can replace the uploaded firmware archive with a malicious one. This enables unauthenticated remote command execution as root.
Originally disclosed on Cisco Talos
An exploitable command execution vulnerability exists in the recovery partition of Bitdefender BOX 2, version 2.0.1.91. The API method /api/updatesetup does not perform firmware signature checks atomically, leading to an exploitable race condition (TOCTTOU) that allows arbitrary execution of system commands.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
The lock protecting the update process is released before the asynchronous signature verification and unpacking complete, allowing the uploaded archive to be replaced between validation and extraction.
Impact
An unauthenticated attacker on the same Wi-Fi network could execute arbitrary commands as root during the bootstrap stage, potentially compromising the device.
What the attacker needed
Attacker on same Wi-Fi network; Device in bootstrap stage (after factory reset); Valid signed firmware archive
The fix
The signature verification and unpacking should be performed atomically while holding the lock, or the archive should be copied to a private location before validation.
How it was found
- Factory-reset the device and connect to the 'Bitdefender BOX' SSID
- Obtain a signed full_ws.tar.gz archive from the smartphone app
- Replace the enc file inside the archive with a large zero-filled file to delay validation
- Create a fake archive containing a custom preinst script
- Upload the two archives in parallel with a timing delay (e.g., seven seconds)
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
When you set up the device, it downloads a signed update file and checks its signature. The check and the unpacking are not done as one uninterruptible step, so an attacker on the same Wi-Fi can swap the file after it has been checked but before it is unpacked. The swapped file can contain a script that runs with full system privileges.
What is Race condition?
Parallel requests reach a state the code assumed could not happen: a coupon used twice, a limit overrun, a check skipped.