News · Model Context Protocol project · 2 min read
Event date: · Published:
MCP Inspector patches terminal control-character injection flaw
The Model Context Protocol project shipped MCP Inspector 2.18.0 on December 5, 2026, fixing a flaw that let malicious MCP servers inject hidden terminal control characters into developers' consoles.
The Model Context Protocol project released version 2.18.0 of MCP Inspector, the official debugging tool for MCP servers, on December 5, 2026, fixing a flaw that let a malicious or compromised MCP server inject raw terminal control characters into a developer's terminal. The fix is documented in the MCP Inspector 2.18.0 release notes.
What changed in version 2.18.0
- The flaw, tracked as the GHSA-2mr9-588x-f57x security advisory, let a malicious or compromised MCP server embed 8-bit C1 control characters and OSC escape sequences into tool names, server names, descriptions, results, resources, or error messages, which Inspector printed raw to the terminal, enabling spoofed output or hidden text.
@modelcontextprotocol/inspectorversions2.0.0-rc.1through2.17.0are affected; the fix shipped in2.18.0, published December 5, 2026.- The older
@modelcontextprotocol/inspector-cliline, versions0.10.2through1.0.7, is also affected; it was fixed in1.0.8, published December 4, 2026. - The fix adds a shared
stringifySafeescaping function incore/cli, applied to all JSON and NDJSON output and error envelopes, plus a sanitizingTextwrapper in the TUI renderer. - The release also bumps the
minimatchdependency to11.0.10andglobto14.0.7.
What it means for people building MCP servers
MCP Inspector is the tool most MCP server developers use to test and debug servers before shipping them. A hostile or compromised MCP server could have hijacked a developer's own terminal the moment it was pointed at in Inspector, making this a supply-chain-style risk for anyone building or vetting MCP servers.
Where to get the fix
Developers on the newer line should upgrade @modelcontextprotocol/inspector to 2.18.0 or later, while those still on the older package should move to @modelcontextprotocol/inspector-cli 1.0.8 or later. The release notes also flag a known regression: when left unmodified, TUI forms submit escaped default values, turning CRLF line endings into LF.
Sources
- Release 2.18.0 - modelcontextprotocol/inspector (Model Context Protocol (GitHub), December 5, 2026, official)
- GHSA-2mr9-588x-f57x advisory issue (Model Context Protocol (GitHub), December 5, 2026, official)
Written with AI assistance, strictly from the sources listed above. Before it went live, automated checks verified its dates, sources and every language edition.