CSCTF 2026Web
Two-Key Turn
The fire-authorization console enforces a "two-person rule": an order only arms after two distinct officers approve it.
- Competition
CSCTF 2026- Category
- WebEasy (128 pts)
- Source status
- Source-documented · not platform-verified
- Document
- PDF edition1 min read
Brief
The challenge
- Competition
- CSCTF (Chronos Security)
- Category
- Web
- Difficulty
- Easy (128 pts)
- Target
http://w01.ctf.chronos-security.ro:40554
TL;DR
The fire-authorization console enforces a "two-person rule": an order only arms after two distinct officers approve it. We only hold one officer's credential (VEGA-7). The POST /orders/{id}/approve endpoint has a race condition — the distinct-officer check runs before the shared order state is updated, so a burst of simultaneous approvals from the same officer registers two approval records. The order reaches ARMED and reveals the arming_authorization token (the flag).
Recon
The API is self-describing. Using Authorization: Bearer opk_vega7_2f4b9c17e0a3:
GET /schema— describes the two-person rule, an ~8s pending TTL, and explicitly notes "an ordinary 6–8 separate-connection approval burst is supported" (the intended exploit hint).GET /orders— lists orders; the target is the one withstatus: PENDING_AUTH:
AO-7D31C9 PENDING_AUTH approvals 0 / required 2 (Coastal Battery 3 — Saltmarsh)Vulnerability
The endpoint validates "has this officer already approved?" and then records the approval in two separate, non-atomic steps. When 6–8 approvals arrive concurrently over separate TCP connections, they all pass the distinct/idempotency check before any of them commits, so the same officer produces two approval records and approvals jumps to 2.
Exploit
Fire 8 concurrent POST /orders/AO-7D31C9/approve requests, each on its own HTTPConnection, synchronized with a barrier so they hit the server simultaneously (see solve.py). Then GET /orders/AO-7D31C9.
Run:
python solve.pyResult
The order detail after the burst:
{ "id": "AO-7D31C9", "status": "ARMED", "approvals": 2, "required_approvals": 2, "approval_records": [ {"record_id": "APR-1-1", "officer": "VEGA-7", "epoch": 1}, {"record_id": "APR-1-2", "officer": "VEGA-7", "epoch": 1} ], "arming_authorization": "CSCTF{pytjK9A2d8SYRlpLhqLXXsAO}"}Both approval records belong to the same officer VEGA-7, confirming the two-person rule was bypassed via the race.
Flag
Flag
CSCTF{pytjK9A2d8SYRlpLhqLXXsAO}
Source-documented · not platform-verified