mcp-feedback-enhanced
Minidoracat/mcp-feedback-enhanced
- Type
- MCP server
- Scanned
- Nov 12, 2026
- Version
- c509042b651f
- Files read
- 155
This MCP server opens a local web page or desktop window so an AI coding agent can show summaries of its work and wait for text or image feedback from the user. Its local web server runs without authentication or Host header validation, allowing malicious websites via DNS rebinding to read private session data and allowing other users on a shared machine to hijack feedback sent to the AI agent.
What it can reach
- Network
- Starts a persistent local HTTP and WebSocket server (default 127.0.0.1:8765, configurable via MCP_WEB_HOST and MCP_WEB_PORT) when feedback is requested.
- Browser
- Opens the default web browser (or Windows browser via cmd.exe, powershell.exe, or wslview on WSL, or a bundled Tauri desktop app when MCP_DESKTOP_MODE is enabled) to display the feedback UI.
- Files
- Reads and writes settings and session history in ~/.config/mcp-feedback-enhanced/, creates ~/.cache/interactive-feedback-mcp-web/, and saves submitted feedback and base64 images to temporary JSON files in the system temp directory.
- System
- Reads OS details, environment variables, memory usage, and listening network connections via psutil, and can terminate local Python processes occupying its preferred port.
Findings
-
HighLocal web server lacks Host header validation, exposing session data to DNS rebinding
src/mcp_feedback_enhanced/web/routes/main_routes.py:138
Once the feedback tool is called, the FastAPI server stays running on a predictable port (8765 by default). While POST requests check the Origin header, GET routes such as /api/all-sessions, /api/load-session-history, /api/current-session, and /api/load-settings perform no Host or Origin checks, and no TrustedHostMiddleware is configured. A malicious website the user visits can use DNS rebinding (resolving an attacker domain on port 8765 to 127.0.0.1) so the browser treats those GET requests as same-origin and lets attacker JavaScript read project paths, AI work summaries, user feedback history, and saved prompts. In addition, if the user binds MCP_WEB_HOST to 0.0.0.0 or ::, is_allowed_origin compares Origin against the untrusted Host header, which also matches during DNS rebinding and allows cross-site settings writes and WebSocket hijacking.
Fix: Validate the Host header on every HTTP and WebSocket request against an explicit allowlist of expected local hostnames (such as 127.0.0.1, localhost, and [::1]), and require a per-server random authentication token instead of relying on Host header matching.
-
MediumInline CSS allowed in AI summary Markdown enables silent data exfiltration and UI spoofing
src/mcp_feedback_enhanced/web/static/js/modules/ui-manager.js:434
When rendering the AI agent's summary as Markdown, DOMPurify is configured to allow the style and class attributes on HTML elements, and the FastAPI server sends no Content-Security-Policy header. DOMPurify does not block external HTTPS URLs inside CSS properties such as background: url(...). If the AI agent is tricked by prompt injection in untrusted content it read, it can call interactive_feedback (which the README recommends auto-approving) with a summary containing inline CSS that silently sends sensitive project text to an attacker's server as soon as the browser renders the summary, or uses fixed-position CSS overlays to spoof the feedback interface.
Fix: Remove 'style' from ALLOWED_ATTR in DOMPurify.sanitize (in both ui-manager.js and session-details-modal.js), force external links to use rel='noopener noreferrer' and target='_blank', and add a strict Content-Security-Policy header (such as default-src 'self'; img-src 'self' data: blob:; style-src 'self' 'unsafe-inline') to HTTP responses.
-
LowUnauthenticated local Web UI and WebSocket allow local session hijacking
src/mcp_feedback_enhanced/web/routes/main_routes.py:79
Neither the HTTP /api/* routes nor the /ws WebSocket endpoint require a password, token, or session cookie, and requests without an Origin header are explicitly permitted. On a shared machine such as an SSH remote development server (a supported deployment scenario) or when untrusted code runs under another local account, any local user or process can read active and historical session summaries and connect to /ws to submit arbitrary feedback. Because the AI coding agent treats submitted feedback as instructions from the user, another local user can steer the victim's agent into editing files or running commands.
Fix: Generate a cryptographically random secret token on server startup, pass it in the URL opened for the user (exchanging it for an HttpOnly session cookie), and require that token on all HTTP and WebSocket endpoints.
-
LowPort manager automatically kills unrelated local FastAPI or Uvicorn processes on port conflict
src/mcp_feedback_enhanced/web/utils/port_manager.py:230
By default (when MCP_TEST_MODE is not set), if preferred port 8765 (or MCP_WEB_PORT) is already in use when the Web UI initializes, PortManager inspects the process holding that port and automatically terminates or kills it if it is a Python process with 'uvicorn' or 'fastapi' anywhere in its command line. If the developer is running their own FastAPI/Uvicorn application on that port, or running a second IDE instance of mcp-feedback-enhanced, it will be killed without confirmation instead of simply falling back to the next free port.
Fix: Disable automatic process termination by default (set auto_cleanup=False) and rely on the existing fallback loop that selects the next available port.
