{"id":"XE-13388","kind":"bounty","visibility":"public","source":"github","source_repo":"xeprotocol/xe","source_ref":"547","source_url":"https://github.com/xeprotocol/xe/issues/547","reporter_id":2,"title":"[Desk] proposals.decide allows unauthorized proposal rejection + ticket existence probing, and proposals.propose accepts unadoptable settled/private/support mutations","area":"other","claimed_tier":null,"assessed_tier":null,"verdict":null,"duplicate_of":null,"tracked":false,"internal_ref":"","internal_url":null,"status":"triaging","closed_reason":null,"github_state":"open","disclosed_at":null,"award_xe":null,"award_approved":false,"paid_ref":"","created_at":"2026-11-14T20:42:15.457769+00:00","updated_at":"2026-11-20T14:28:39.798122+00:00","source_created_at":"2026-11-13T10:39:16+00:00","told_at":"2026-11-20T13:03:48+00:00","status_changed_at":"2026-11-20T13:03:29.038775+00:00","url":"https://bounty.xe.network/XE-13388","body":"### Summary\n\n`desk/services/proposals.py` has two coupled authorization and proposal-validity gaps across `decide()` and `propose()`:\n\n1. **Missing visibility & field RBAC on `decide(..., adopt=False)`**:\n   - 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`.\n   - 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).\n   - 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)`.\n2. **Unadoptable proposals accepted by `propose()` (and stale `award_xe` adoption on settled tickets)**:\n   - `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.\n   - `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`.\n\n### Impact\n\n- **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.\n- **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.\n\n### Fix\n\n- 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.\n- 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`.\n","patch_refs":[],"thread":[{"id":3150,"source":"github","source_ref":"6850511558","author":"Khanhtnq","team":false,"body":"Fix opened in https://github.com/xeprotocol/desk/pull/3.","created_at":"2026-11-13T10:39:19+00:00"},{"id":14619,"source":"github","source_ref":"7040237045","author":"Joseph Denne","team":true,"body":"Thanks for the report. We have read it against the code and it is being handled. The assessment and any award follow the fix.","created_at":"2026-11-20T13:03:48+00:00"}]}