None
EN
Deceiving users with ANSI terminal codes in MCP
['Keith Hoodlet']
The Trail of Bits Blog
ANSI terminal escape codes—special character sequences used to control terminal formatting, such as to change colors, move the cursor, or modify other display attributes—can be used to obfuscate malicious payloads in MCP server tool descriptions. When a terminal processes this sequence, the text between this escape code and the reset code ( \x1B[m ) becomes invisible—white text on a white background. This output includes fairly verbose instructions about adding a backdoor to the user’s software project, followed by ANSI control characters that clear the user’s screen.