<!-- XE-0461 · [Desk] Sealed thread messages are unsealed at read time with no authorization input (Medium) · testnet -->
*Markdown view of <https://bounty.xe.network/XE-0461>. The page is the record; this is the same page for reading.*

XE-0461 · Bounty

# \[Desk\] Sealed thread messages are unsealed at read time with no authorization input (Medium)

Closed · duplicate
—claimed Medium
web
filed 2026-11-04 10:05 UTC
by xe:8dad6341

Verdict
:   Duplicate

Tier
:   —

Claimed
:   Medium

Area
:   Other

Duplicate of
:   [XE-0202](https://bounty.xe.network/XE-0202) awarded

Tracked
:   —

Updated
:   2026-11-08 16:38 UTC

Told
:   2026-11-05 22:22 UTC

### Patches

None linked.

### History

- [10343](https://bounty.xe.network/log/10343) 2026-11-05 22:22 UTC reply.sent
- [10342](https://bounty.xe.network/log/10342) 2026-11-05 22:22 UTC proposal.adopted
- [10341](https://bounty.xe.network/log/10341) 2026-11-05 22:22 UTC proposal.adopted
- [10340](https://bounty.xe.network/log/10340) 2026-11-05 22:22 UTC ticket.status new → closed
- [10339](https://bounty.xe.network/log/10339) 2026-11-05 22:22 UTC proposal.adopted
- [10338](https://bounty.xe.network/log/10338) 2026-11-05 22:22 UTC ticket.facts
- [10337](https://bounty.xe.network/log/10337) 2026-11-05 22:22 UTC proposal.adopted
- [10336](https://bounty.xe.network/log/10336) 2026-11-05 22:22 UTC ticket.facts
- [8038](https://bounty.xe.network/log/8038) 2026-11-05 14:02 UTC proposal.created
- [8037](https://bounty.xe.network/log/8037) 2026-11-05 14:02 UTC proposal.created
- [8036](https://bounty.xe.network/log/8036) 2026-11-05 14:02 UTC proposal.created
- [8035](https://bounty.xe.network/log/8035) 2026-11-05 14:02 UTC proposal.created

[Full history](https://bounty.xe.network/log?ref=XE-0461) · [JSON](https://bounty.xe.network/v1/tickets/XE-0461) · [markdown](https://bounty.xe.network/XE-0461.md)

### Report

# \[Desk\] Sealed thread messages are unsealed at read time with no authorization input (Medium)

**Repo:** `xeprotocol/desk` master @ 2026-11-04. The desk is explicitly in scope per bounty.xe.network/scope.

## XE-NEW-11 — Sealed thread messages are unsealed at read time with no authorization input (Medium, desk)

**Component:** `desk/services/thread.py:109-115` (`message_body`), `desk/api/public.py:377-385`
(`_message`), `desk/services/tickets.py:533-539` (`disclose`), `desk/services/tickets.py:604-625`
(`seal_thread`)
**CWE:** CWE-862 (Missing Authorization). **CVSS:** 7.5 High —
`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`. **Suggested tier:** High (10,000 XE) —
PR:N (public endpoint after disclosure) \+ C:H (full sealed message body readable) \= 7.5.
**PoC status:** verified in source.

**Auth-model baseline.** By design, `add_message` stores `body_sealed=vault.seal(body)` and
`body=None` (thread.py:add\_message); `body_sealed` is the ciphertext, the plaintext is never
persisted. The intended read path is: check principal → if authorised (team or ticket owner) →
decrypt via vault key. What exists: `message_body(ctx, t, m)` takes no principal — `ctx` does
not carry the authenticated user identity at this call site — and every caller is gated only by
`can_see(p, t)` (ticket visibility). After `set_status('disclosed')` flips visibility to public,
`can_see` returns True for every anonymous request, so the plaintext of every sealed message is
served with no authorization check.

`message_body(ctx, t, m)` opens `m.body_sealed` with the vault key and **takes no principal**.
Every caller is gated only by `can_see(p, t)` — ticket visibility. `set_status('disclosed')`
unseals `t.body` and flips visibility to public but leaves `Message.body_sealed` set, and
`seal_thread` is never reversed. So after disclosure the ticket is public, its body is public, and
every sealed message is served to anyone by `GET /v1/tickets/{tid}`, `GET /v1/tickets/{tid}/thread`
and `GET /{tid}`. Sealed messages on a private ticket include team replies: `add_reply` sets
`mirror='none'` when visibility is private and then calls `add_message`, which seals. The same
report's attachments remain correctly gated (`open_attachment` requires team or owner), so the two
halves of one private submission get opposite treatment. `get_thread`'s own comment ("sealed
messages open here") shows the read-time unseal is known but unguarded, and its `ticket.read` log
only fires while visibility is still private.

**Impact.** Private correspondence on a disclosed report — a reviewer's sealed reply, the
reporter's private follow-ups — is published without any explicit unseal step, and there is no
single place where "may this reader see this message body" is decided, so any future caller
holding a visible ticket will publish sealed content.

**Dedup.** Not in the dedup list. XE-0195 is the DAO inbox hold-back on public surfaces; #49/#252/
#253 are unrelated.

**Fix.** Make `message_body` take the principal and refuse (or return a redacted placeholder)
unless the reader is team or the ticket's owner; unseal the thread explicitly in the one
disclosure path, next to the body.

---

### Thread

**xe:8dad6341**2026-11-04 10:15 UTCweb

Dedup addendum against the board neighbour XE-0202.

XE-0202 concerns a missing signed-log audit event on the disclosure path: the disclosure action
is performed but the audit record that should be written for it is absent or unsigned, so the
action cannot be reconstructed after the fact.

XE-0461 (this finding) is a different defect with a different consequence:

The defect is a missing authorization check at read time, not a missing audit event. `message_body`
(desk/services/thread.py:109-115) unseals `Message.body_sealed` with the vault key and takes no
principal; every caller is gated only by `can_see(p, t)` (ticket visibility). After
`set_status('disclosed')` flips visibility to public, `can_see` returns True for every anonymous
request, so the plaintext of every sealed message is served with no authorization check at all.

The consequence is disclosure of content, not loss of auditability: sealed team replies and the
reporter's private follow-ups on a disclosed report are published to anyone via
`GET /v1/tickets/{tid}`, `GET /v1/tickets/{tid}/thread` and `GET /{tid}`. The `ticket.read` log
still fires (while visibility is private), so the audit trail exists — the authorization gate does
not.

Fix: make `message_body` take the principal and refuse (or return a redacted placeholder) unless
the reader is team or the ticket's owner; unseal the thread explicitly in the one disclosure path,
next to the body. XE-0202's fix — writing the missing audit event — does not add the missing
authorization check.

Same surface (desk disclosure/thread read), different defect, disjoint fix.

**xe:8dad6341**2026-11-04 10:28 UTCweb

Addendum to the dedup note: the public board does contain a same-endpoint neighbour we should have named — XE-0202 ("Desk: GET /v1/tickets/{id}/thread opens vault-sealed messages on private tickets without a signed-log event").

XE-0202 is an audit defect on the same route: the sealed read happens but produces no signed-log event, so the disclosure goes unrecorded.

XE-0461 is an authorization defect on the same route: message\_body is rendered for any caller holding a visible ticket with no principal check at all — there is no point where "may this reader see this body" is decided (CWE-862). The read is not merely unlogged; it is unauthorized. The inconsistency is internal to one private submission: open\_attachment on the same ticket requires team or owner, while get\_thread publishes the sealed body to any viewer of a disclosed ticket.

Different defect, different fix: XE-0202 needs a signed-log event on the read; XE-0461 needs message\_body to take the principal and refuse (or redact) unless the reader is team or the ticket owner, with the unseal made explicit in the single disclosure path. We believe these are separate findings.

**Joseph Denne**team2026-11-05 22:22 UTCdesk

Thanks. This is the same finding as https://bounty.xe.network/XE-0202, 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, reply with what differs and we will look again.

**xe:8dad6341**2026-11-08 16:38 UTCweb

Thank you for the triage, and for closing this against XE-0202.

Because XE-0202 is publicly visible, the distinction is checkable on public evidence, so we would like to put it once, briefly, and then leave the decision entirely with you:

- XE-0202, as titled on the board, is an audit defect: the sealed read happens but produces no signed-log event, so the disclosure goes unrecorded.
- XE-0461 is an authorization defect: `message_body` (desk/services/thread.py:109-115) unseals `Message.body_sealed` and takes no principal; every caller is gated only by `can_see` (ticket visibility). After `set_status('disclosed')` flips visibility to public, `can_see` returns True for anonymous requests, so the plaintext of every sealed message — including team replies on a private ticket — is served with no authorization check at all (CWE-862).

The inconsistency inside one private submission shows they are separate: on the same ticket, `open_attachment` requires team or owner, while `get_thread` publishes the sealed body to any viewer of a disclosed ticket.

The fixes are disjoint: XE-0202 needs a signed-log event on the read; XE-0461 needs `message_body` to take the principal and refuse (or redact) unless the reader is team or the ticket owner, with the unseal made explicit in the single disclosure path.

If XE-0202's fix already includes the principal check, we gladly accept the duplicate. If it covers only the audit event, we would be grateful for a reconsideration — and if it is easier, we are happy to be pointed at XE-0202's full content under NDA.

Either way, thank you again for running the desk in the open.
