{"id":"XE-1086","kind":"bounty","visibility":"public","source":"web","source_repo":"","source_ref":"","source_url":"","reporter_id":316,"title":"OAuth sign-in splits one email across two reporter rows: from_github and from_platform skip the duplicate-email check that from_email enforces","area":"other","claimed_tier":"minor","assessed_tier":null,"verdict":"duplicate","duplicate_of":"XE-1012","tracked":false,"internal_ref":"","internal_url":"","status":"closed","closed_reason":"duplicate","github_state":"","disclosed_at":null,"award_xe":null,"award_approved":false,"paid_ref":"","created_at":"2026-11-07T14:26:06.484868+00:00","updated_at":"2026-11-14T22:53:33.031826+00:00","source_created_at":null,"told_at":"2026-11-14T22:53:33.319061+00:00","status_changed_at":"2026-11-08T20:32:07.713129+00:00","url":"https://bounty.xe.network/XE-1086","body":"## Summary\r\n\r\n`from_email` refuses to attach an address that already belongs to another reporter row (HTTP 409, \"that address is already on another account\"). `from_github` and `from_platform` set a provider-verified email with no such check, so one address ends up on two rows. Reproduced against a real PostgreSQL instance using this desk's own fixtures; output below.\r\n\r\n## Locations\r\n\r\n- `desk/services/reporters.py:161` — `from_github` creates `Reporter(github_login=..., github_id=..., email=email, ...)` with no duplicate-email check.\r\n- `desk/services/channels.py:74-75` — `from_platform` does `if email and not r.email: r.email = email.lower()`, same omission.\r\n- `desk/services/reporters.py:188-190` — `from_email`, the control: raises 409 on exactly this state.\r\n- `desk/api/reporter.py:256-261` — `_email_link` binds a link to `by_email()`'s row (lowest id).\r\n- `desk/api/reporter.py:303-306` — `email_finish` then demands the browser be signed in as that row.\r\n\r\n## Reproduction (validated)\r\n\r\n```\r\n[1] email sign-in   -> reporter row #1  email=researcher@xe.network\r\n[2] github sign-in  -> reporter row #2  email=researcher@xe.network\r\n[3] rows holding researcher@xe.network: [(1, 'researcher@xe.network', None), (2, 'researcher@xe.network', 99001)]\r\n[4] from_email on the same state -> HTTP 409: that address is already on another account; sign in there to use it\r\n[5] private ticket XE-0001 filed under row #2 (visibility=private)\r\n[6] /my as row #2: 1 ticket(s);  /my as row #1: 0 ticket(s)\r\n[7] a new email link for researcher@xe.network is bound to row #1 (by_email picks the lowest id)\r\n[8] email_finish would accept it: False  -> HTTP 400, permanently\r\n```\r\n\r\nStep [4] is the control: the same state is refused on the email path, which establishes that one-address-one-row is an intended invariant rather than a design choice. No attacker is involved at any step; the email is provider-verified at both entry points, so this is not account takeover.\r\n\r\n## Impact\r\n\r\n1. A reporter's vault-sealed private (Critical/Severe) report filed under one row is unreachable from the other: `my_tickets` filters on `reporter_id`, and `open_attachment` admits only the owner or the team. The reporter loses read access to their own sealed report.\r\n2. `bind_payout` propagates the bound address only to the signed-in row's tickets, so an awarded ticket on the other row keeps no payout address and payment stalls.\r\n3. The email sign-in path for that address becomes permanently unusable: the link is bound to a row the user can no longer reach, because reaching it requires that link.\r\n4. Team-side `by_email` resolution (`attach`, email intake) silently picks the stale row.\r\n\r\n## Suggested fix\r\n\r\nApply the rule `from_email` already uses in `from_github` and `from_platform`: if another row holds the address, either refuse or route through the existing `merge` path the way `from_github` already does for a matching `github_id`. A partial unique index on `reporters.email` (where email <> '') would make the invariant structural instead of per-call-site.\r\n\r\nClaimed minor: the flaw needs no attacker and the reporter retains access through the row they are signed in as; the loss is of the sealed report and the payout binding on the other row, plus a dead sign-in path.","patch_refs":[],"thread":[{"id":3743,"source":"desk","source_ref":"reply:2485","author":"XE desk","team":true,"body":"Thanks. This is the same finding as https://bounty.xe.network/XE-1012, which was filed first; the programme pays the\nfirst verifiable submission, so this one closes as a duplicate. If you believe it is a different\nbug, file a new report that links https://bounty.xe.network/XE-1086 and says what differs; it is read like any other.","created_at":"2026-11-14T22:53:33.031826+00:00"}]}