OAuth sign-in splits one email across two reporter rows: from_github and from_platform skip the duplicate-email check that from_email enforces
Report
Summary
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.
Locations
desk/services/reporters.py:161—from_githubcreatesReporter(github_login=..., github_id=..., email=email, ...)with no duplicate-email check.desk/services/channels.py:74-75—from_platformdoesif email and not r.email: r.email = email.lower(), same omission.desk/services/reporters.py:188-190—from_email, the control: raises 409 on exactly this state.desk/api/reporter.py:256-261—_email_linkbinds a link toby_email()'s row (lowest id).desk/api/reporter.py:303-306—email_finishthen demands the browser be signed in as that row.
Reproduction (validated)
[1] email sign-in -> reporter row #1 email=researcher@xe.network
[2] github sign-in -> reporter row #2 email=researcher@xe.network
[3] rows holding researcher@xe.network: [(1, 'researcher@xe.network', None), (2, 'researcher@xe.network', 99001)]
[4] from_email on the same state -> HTTP 409: that address is already on another account; sign in there to use it
[5] private ticket XE-0001 filed under row #2 (visibility=private)
[6] /my as row #2: 1 ticket(s); /my as row #1: 0 ticket(s)
[7] a new email link for researcher@xe.network is bound to row #1 (by_email picks the lowest id)
[8] email_finish would accept it: False -> HTTP 400, permanently
Step [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.
Impact
- A reporter's vault-sealed private (Critical/Severe) report filed under one row is unreachable from the other:
my_ticketsfilters onreporter_id, andopen_attachmentadmits only the owner or the team. The reporter loses read access to their own sealed report. bind_payoutpropagates 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.- 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.
- Team-side
by_emailresolution (attach, email intake) silently picks the stale row.
Suggested fix
Apply 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.
Claimed 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.
Thread
Thanks. This is the same finding as https://bounty.xe.network/XE-1012, which was filed first; the programme pays the first verifiable submission, so this one closes as a duplicate. If you believe it is a different bug, file a new report that links https://bounty.xe.network/XE-1086 and says what differs; it is read like any other.