Blog / A01:2021 Broken Access Control
A01:2021 · Broken Access Control

Any nearby peer can drive your BLE write path

A remote peer picks the characteristic and the value. The server passes both to your app callback and acks success, with no identity check between the radio and your logic.

peer connectsover BLEpeer writes acharacteristicserver forwardsthe value to…success ackedwithout…write logic runson attacker inputATTACKER INPUTIMPACTcheck absent
Attack path · peer connects over BLE → peer writes a characteristic → server forwards the value to the app callback → success acked without authorization → write logic runs on attacker input

A remote peer picks the characteristic and the value. The server passes both to your app callback and acks success, with no identity check between the radio and your logic.

What goes wrong

Writes are worse than reads because they change state. A remote central chooses which characteristic to write and what bytes to send, and the server passes both straight to your application callback, then acknowledges success. Nothing between the radio and your handler asks whether that peer is bonded or authorized.

So whatever your write logic does, whether it flips a setting or moves data, it now runs on input from any peer the GATT configuration lets connect. The acknowledgement makes it look like a normal, accepted operation. The attacker does not need to break encryption. They need to be in range and speak the protocol.

The pattern

Vulnerable
function onWriteRequest(device, characteristic, value):
    // peer identity never checked
    // value passed straight to app logic
    app.handleWrite(characteristic, value)
    respond(SUCCESS)
    return
Hardened
function onWriteRequest(device, characteristic, value):
    if (!device.isBonded() || !session.isAuthorized(device)):
        respond(INSUFFICIENT_AUTHORIZATION)
        return
    if (!validate(characteristic, value)):
        respond(INVALID_ATTRIBUTE_VALUE)
        return
    app.handleWrite(characteristic, value)
    respond(SUCCESS)
How the pipeline adjudicated itHELD
ABCDEFGH

Grounding and reachability were confirmed. The exploit-path gate would not conclude without the calling code, so the finding was held and an evidence request was raised instead of being reported as fact.

Ed25519 · per-tenant signing key · gate ledger A–H · verify offline against the published payload hash

Why it matters to you

An unauthenticated write path is a direct line into your application from the airwaves. If the handler can change device settings or move data, then range plus protocol knowledge equals control. Authorize the peer before the callback runs, then validate the payload after. Treat every byte from a connected central as hostile until you have checked both.

Check your own code