B-2 SECURITY: wallet DID auto-link overwrites victim's Did — account takeover #33
Labels
No labels
epic
phase-0
phase-1
phase-2
phase-3
phase-4
phase-5
phase-6
phase-7
phase-8
phase-9
priority/P0
priority/P1
priority/P2
type/backend
type/client
type/docs
type/ops
type/security
type/spike
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
primatekuntech/failsulit#33
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
RegisterVerify.cs:84-119: when a wallet VC's client-asserted email claim matches an existing user, that user's Did is overwritten with the attacker-registered DID (no verification, no null-check on existing Did). Authenticate.cs:44-52 then logs in purely by Did → full session on the victim's account. Attack: register DID with SharedClaims.email = victim@example.com.
Fix (minimum): link only when existingByEmail.Did is null AND email is verified (or re-verify via OTP); otherwise 409. Enforce again in the unified provisioning service (#19 / task 1.4). Add regression test: DID-overwrite attempt rejected.
Related: C-2/IDA-09 (#19, #25), Full findings + evidence: docs/redesign/2026-11-onboarding-passkey/08-code-baseline-review.md
Fixed in
603e33c(TDD: DidAutoLinkTests red → green).Known limitation (documented): new-user path can still squat an unclaimed email (EmailVerified=false) — deprecated wallet path, resolved by Phase 2 IdP switch.
Verified: 3 consecutive green runs (682/682 ×3, Release).