Bounty
XE-1086 · Bounty

OAuth sign-in splits one email across two reporter rows: from_github and from_platform skip the duplicate-email check that from_email enforces

Closed · duplicate —claimed Minor web filed 2026-11-07 14:26 UTC by xe:c80fb912

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_github creates Reporter(github_login=..., github_id=..., email=email, ...) with no duplicate-email check.
  • desk/services/channels.py:74-75 — from_platform does if 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_link binds a link to by_email()'s row (lowest id).
  • desk/api/reporter.py:303-306 — email_finish then 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

  1. 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.
  2. 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.
  3. 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.
  4. Team-side by_email resolution (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

XE deskteam2026-11-14 22:53 UTCdesk

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.