ANSI Escape Injection in MCP Servers: Hidden from Humans, Visible to AI
I explore how ANSI escape sequences, designed for terminals, create a dangerous blind spot where attackers hide instructions from human reviewers while remaining fully visible to AI agents. This vulnerability allows malicious code to bypass human oversight in Model Context Protocol servers, leading to unauthorized actions. I detail how our Bright Security scanner uses DAST to automatically detect these hidden payloads in both direct-fetch and stored scenarios.
A human reading a rendered terminal never sees the codes themselves — only their effect. A language model reading the same content sees every byte. That gap is the whole attack.