Audit(#66): PATCH /api/me writes an arbitrary unverified Email — squatting blocks real owner registration #103

Closed
opened 2026-11-07 19:22:50 +01:00 by amiryahaya · 0 comments
Owner

UpdateProfile.cs:38-46 lets any Active user (even pending/no-workspace via the /api/me allowed prefix) set user.Email to any unused string — no format check, no OTP proof, no uniqueness pre-check.

Trigger: wallet user sets email: boss@company.com → the real owner's later POST /api/auth/email/register for that address 409s forever; recovery/OTP mail routes to the squatter's row. If the address is taken → unique-index violation surfaces as a 500 (existence oracle).

Fix: drop Email from UpdateProfile (changes belong to the LinkEmail OTP flow), or apply format+uniqueness checks without ever marking verified.

M1.5 close audit (#66).

UpdateProfile.cs:38-46 lets any Active user (even pending/no-workspace via the /api/me allowed prefix) set `user.Email` to any unused string — no format check, no OTP proof, no uniqueness pre-check. **Trigger**: wallet user sets `email: boss@company.com` → the real owner's later `POST /api/auth/email/register` for that address 409s forever; recovery/OTP mail routes to the squatter's row. If the address is taken → unique-index violation surfaces as a 500 (existence oracle). **Fix**: drop Email from UpdateProfile (changes belong to the LinkEmail OTP flow), or apply format+uniqueness checks without ever marking verified. M1.5 close audit (#66).
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#103
No description provided.