Bounty
XE-13388 · Bounty

[Desk] proposals.decide allows unauthorized proposal rejection + ticket existence probing, and proposals.propose accepts unadoptable settled/private/support mutations

Triaging xe#547 filed 2026-11-13 10:39 UTC by Khanhtnq

Report

Summary

desk/services/proposals.py has two coupled authorization and proposal-validity gaps across decide() and propose():

  1. Missing visibility & field RBAC on decide(..., adopt=False):
    • In proposals.decide, require(p, "reply", t), require_field(p, "status"), require(p, "award", t), and require_field(p, pr.field) were only executed inside the if adopt: branch, and can_see(p, t) was not checked before acting on t.
    • Consequently, any authenticated user lacking permission on pr.field (for example, a member without award or reply rights, or a principal who cannot see a private ticket t) could call decide(..., adopt=False) to reject pending award_xe, reply_draft, status, or fact proposals—silently clearing maintainers' pending triage/treasury queue items and probing private ticket existence (404 "ticket is gone" vs 200 rejection).
    • Even on adopt=True for reply_draft when send_plain is false (or send_review returns a review reason), decide handed back/adopted the draft without calling require(p, "reply", t).
  2. Unadoptable proposals accepted by propose() (and stale award_xe adoption on settled tickets):
    • propose() accepted assessed_tier changes on awarded/paid tickets, visibility="public" proposals on private tickets (which set_facts rejects because private tickets must go through disclose), award_xe proposals on support tickets (t.kind != "bounty"), and award_xe mutations on tickets whose award is already approved (t.award_approved_at) or settled (awarded/paid)—leaving unadoptable proposals sitting on tickets until a human clicked adopt and hit an error.
    • decide(..., adopt=True) on pr.field == "award_xe" also called tsvc.set_award without guarding t.status in ("awarded", "paid") when the amount differed from t.award_xe.

Impact

  • RBAC bypass & private-ticket oracle: Unauthorized principals can reject pending award_xe, status, reply_draft, and fact proposals or adopt non-plain reply_draft proposals without reply permission, and distinguish private tickets with pending proposals.
  • Settled-ticket & triage integrity: Agent tokens can enqueue unadoptable proposals on awarded/paid, private, or support tickets, and stale award_xe proposals can mutate settled tickets on adoption.

Fix

  • Enforce _require_proposal_permission(p, pr, t, adopt=adopt) at the top of proposals.decide before branching on adopt: check can_see(p, t) (404 otherwise), require "award" for award_xe, "reply" for reply_draft, require_field(p, pr.field) for status/facts, and "reply" when adopting a duplicate-close status proposal.
  • Enforce upfront guards in proposals.propose for assessed_tier on awarded/paid tickets (409), visibility="public" on private tickets (400), award_xe on non-bounty tickets (400), and award_xe changes when t.award_approved_at or t.status in ("awarded", "paid") (409), plus re-verify settled status in decide before set_award.

Thread

Khanhtnq2026-11-13 10:39 UTCgithub

Fix opened in https://github.com/xeprotocol/desk/pull/3.

Joseph Denneteam2026-11-20 13:03 UTCgithub

Thanks for the report. We have read it against the code and it is being handled. The assessment and any award follow the fix.