CLI chat: remote message text is printed to the terminal raw (ANSI/OSC injection, line spoofing)
Report
Summary. xe chat read prints sender-controlled message text to the terminal without escaping, allowing ANSI/OSC escape injection and forged transcript lines from any remote sender.
Documented rule. Untrusted remote content written to a terminal must be escaped; the CLI's own --json path already neutralises control characters via JSON encoding.
Code path. xe/cmd/xe/chat.go printEnvelope (lines 220-231): the non-JSON branch formats env.Message (and the address fields) directly into the output with fmt.Fprintf. Affected code is at xe HEAD 89a542e.
Reproduction. Send a chat message containing an OSC-52 clipboard escape sequence or an embedded newline followed by a forged transcript line to a victim address; the victim runs xe chat read and the escape sequence reaches their terminal / the forged line appears in their transcript.
Impact. Clipboard manipulation on OSC-52 terminals and convincing transcript spoofing for every user of the default read path.
Thread
Thanks. This is the same finding as an earlier report that is not public, 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-12957 and says what differs; it is read like any other.