M1-audit: recovery trustee gate bypassable via Approved requests from a dead setup epoch #86

Closed
opened 2026-11-07 08:40:51 +01:00 by amiryahaya · 0 comments
Owner

Completion queries (RekeyRecovery.cs:84-87, CompleteRecovery.cs:55-60) match approved requests by RequesterId+Status+expiry only — no RecoverySetupId == setup.Id, no active-setup check. RecoverySetup rows are REUSED on re-setup (unique UserId index), keeping old trustee rows/approvals. ApproveRecoveryRequest (44-48) never checks setup.IsActive; DeleteRecoverySetup doesn't expire outstanding requests.

Trigger: trustees approve → user abandons and re-setups (new KeyProof) → an attacker holding the CURRENT recovery file calls /api/recovery/rekey → trustee gate passes with zero trustee involvement in the 48h window.

Fix: tie completion to rr.RecoverySetupId == setup.Id; add setup.IsActive check in Approve/Reject; expire outstanding requests on setup delete/re-create; raise threshold handling for in-flight requests.

Part of M1 closure audit #84.

Completion queries (RekeyRecovery.cs:84-87, CompleteRecovery.cs:55-60) match approved requests by RequesterId+Status+expiry only — no `RecoverySetupId == setup.Id`, no active-setup check. RecoverySetup rows are REUSED on re-setup (unique UserId index), keeping old trustee rows/approvals. ApproveRecoveryRequest (44-48) never checks setup.IsActive; DeleteRecoverySetup doesn't expire outstanding requests. **Trigger**: trustees approve → user abandons and re-setups (new KeyProof) → an attacker holding the CURRENT recovery file calls /api/recovery/rekey → trustee gate passes with zero trustee involvement in the 48h window. **Fix**: tie completion to `rr.RecoverySetupId == setup.Id`; add `setup.IsActive` check in Approve/Reject; expire outstanding requests on setup delete/re-create; raise threshold handling for in-flight requests. Part of M1 closure audit #84.
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
primatekuntech/failsulit#86
No description provided.