DashboardopencodePTY malformed UTF-16

PTY malformed UTF-16

Category: gotcha
Confidence: 1.00
ID: 01a08278-c6a6-7fc8-9c44-b4ecf22ca18a
Project ID: c0425955-02bc-4c17-9af2-b114c00077e7
Cross-project: No
Recalled in other projects: 1
Source session: 0OJYWmHUobcuQ4y8f
Created: 2026-09-08 19:22:00
Updated: 2026-09-08 19:22:28

Cross-Project Recalls

ProjectHitsLast recalled
opencode-lore 1 14h ago

Content

Trap: validating JavaScript string length, NUL absence, and encoded byte limits looks sufficient, but UTF-8 encoding replaces lone UTF-16 surrogates, so approved text can differ from transported and executed bytes. Fix: require String.prototype.isWellFormed() for commands, every argument, and decoded writes before permission checks, byte limits, canonical resource construction, transport encoding, or execution.

Move to: