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
function onWriteRequest(device, characteristic, value):
// peer identity never checked
// value passed straight to app logic
app.handleWrite(characteristic, value)
respond(SUCCESS)
returnfunction 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)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.
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
- Trace every write characteristic to the application code it triggers.
- Require a bonded, authorized session before any write callback executes.
- Validate the characteristic and payload before acting, and reject unknown shapes.
- Confirm your GATT permissions do not let unpaired peers reach write handlers.