<!-- XE-12957 · CLI chat: remote message text is printed to the terminal raw (ANSI/OSC injection, line spoofing) · testnet -->
*Markdown view of <https://bounty.xe.network/XE-12957>. The page is the record; this is the same page for reading.*

XE-12957 · Bounty

# CLI chat: remote message text is printed to the terminal raw (ANSI/OSC injection, line spoofing)

Closed · duplicate
—claimed Medium
web
filed 2026-11-14 14:45 UTC
by Jeri055

Verdict
:   Duplicate

Tier
:   —

Claimed
:   Medium

Area
:   Node / API

Duplicate of
:   —

Tracked
:   —

Updated
:   2026-11-20 19:46 UTC

Told
:   2026-11-20 19:46 UTC

### Patches

None linked.

### History

- [626899](https://bounty.xe.network/log/626899) 2026-11-20 19:46 UTC proposal.adopted
- [626898](https://bounty.xe.network/log/626898) 2026-11-20 19:46 UTC reply.sent
- [626897](https://bounty.xe.network/log/626897) 2026-11-20 19:46 UTC ticket.status new → closed
- [623731](https://bounty.xe.network/log/623731) 2026-11-20 19:45 UTC proposal.adopted
- [623730](https://bounty.xe.network/log/623730) 2026-11-20 19:45 UTC ticket.facts area
- [623729](https://bounty.xe.network/log/623729) 2026-11-20 19:45 UTC proposal.adopted
- [623728](https://bounty.xe.network/log/623728) 2026-11-20 19:45 UTC ticket.facts
- [623727](https://bounty.xe.network/log/623727) 2026-11-20 19:45 UTC proposal.adopted
- [623726](https://bounty.xe.network/log/623726) 2026-11-20 19:45 UTC ticket.facts
- [606628](https://bounty.xe.network/log/606628) 2026-11-20 14:44 UTC note.added
- [606627](https://bounty.xe.network/log/606627) 2026-11-20 14:44 UTC proposal.created
- [606626](https://bounty.xe.network/log/606626) 2026-11-20 14:44 UTC proposal.created

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

### 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

**Joseph Denne**team2026-11-20 19:46 UTCdesk

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.
