← MCP server and skill grades

nuphus-mcp

mrpulor-gh/nuphus-mcp

B
Type
MCP server
Scanned
Nov 17, 2026
Version
7b688e9bed41
Files read
117

nuphus-mcp is a desktop and browser automation MCP server that lets AI agents view the screen, control OS windows, mouse, keyboard, and clipboard, and drive Chrome over the Chrome DevTools Protocol. Its biggest risks are that full computer control runs without human confirmation by default (and its optional confirmation flag only checks an AI-controlled tool argument), while managed Chrome sessions unconditionally disable the browser OS sandbox (--no-sandbox) when visiting untrusted websites.

What it can reach

System
Captures full-screen and window screenshots, enumerates/moves/resizes/activates OS windows, reads Windows UIA and macOS Accessibility trees, launches installed or registered desktop applications, moves/clicks/drags the mouse, sends arbitrary keystrokes and hotkeys to windows, writes/clears the clipboard (temporarily reading text to restore it after pasting), and displays HUD overlays or OS notifications.
Browser
Launches and controls Chrome, Chromium, or Edge (or attaches to an external CDP port), navigates tabs, reads accessibility trees and page text, dispatches mouse and keyboard events, executes arbitrary JavaScript in pages and frames, reads/sets/imports cookies, uploads or drags local files and directories onto pages, and manages downloads.
Files
Reads local files and directories supplied to browser upload/drag tools or vision/OCR tools, writes PNG screenshots to disk, stores persistent browser profiles, downloads, lock files, and ~30 MB of ONNX models in the user data directory, and writes temporary screen captures to the OS temp directory.
Network
Browses arbitrary HTTP/HTTPS websites via Chrome, auto-downloads PaddleOCR and YOLO ONNX models on first perceive run from hf-mirror.com, huggingface.co, and gitee.com, and sends base64 screenshots to the configured cloud vision endpoint (NUPHUS_MCP_VISION_BASE_URL) when desktop_vision is used.
Secrets
Reads NUPHUS_MCP_VISION_API_KEY from environment variables to call the user's vision LLM API, accesses cookies and logged-in sessions inside the managed or attached Chrome profile, and can capture any credentials visible on the user's screen.

Findings

4 medium3 low
  1. MediumManaged Chrome is launched unconditionally with --no-sandbox

    crates/nuphus-browser/src/client.rs:1427

    Whenever nuphus-mcp launches its managed Chrome browser (the default mode unless NUPHUS_MCP_BROWSER_CDP_URL is configured), BrowserClient::launch calls .no_sandbox() unconditionally, even for headed desktop sessions. A code comment assumes arbitrary web browsing is not exposed and an error message in the same file mistakenly claims headed sessions keep the sandbox enabled, neither of which is true here. Disabling Chrome's OS sandbox removes the primary boundary isolating untrusted web pages, ads, and third-party iframes from the user's operating system.

    Fix: Remove .no_sandbox() from BrowserConfig::builder() so Chrome runs with its OS sandbox enabled by default, or gate it behind an explicit opt-in environment variable for container environments.

  2. MediumBrowser SSRF protection in validate_nav_url is trivially bypassed

    crates/nuphus-mcp/src/tools/browser.rs:83

    browser_navigate and browser_new_tab call validate_nav_url to block loopback, private intranet, and cloud metadata (169.254.169.254) hosts unless NUPHUS_MCP_ALLOW_PRIVATE_NAV=1 is set. However, nav_host only splits the authority on '/', ignoring '?', '#', and '\' (so URLs like http://127.0.0.1?x=1, http://localhost#a, or http://169.254.169.254\latest\meta-data fail IP parsing and pass validation while Chrome normalizes and loads them). host_is_private also misses IPv4-mapped IPv6 literals such as http://[::ffff:127.0.0.1]/ and http://[::ffff:169.254.169.254]/, integer/hex/octal IPv4 encodings, trailing-dot localhost., DNS rebinding, and HTTP 301/302 redirects from public URLs to internal targets (whose contents browser_navigate then auto-snapshots back to the agent).

    Fix: Parse URLs with a WHATWG-compliant parser (such as reqwest::Url, which is already a dependency), normalize IPv4-mapped IPv6 addresses (to_ipv4_mapped), resolve DNS and block private/loopback/link-local IPs, and intercept navigation redirects via the CDP Fetch or Network domain.

  3. MediumIncomplete path validation allows Windows SMB credential leaks, symlink traversal, and file overwrites

    crates/nuphus-mcp/src/security.rs:164

    validate_screenshot_path rejects '\\?\' and '\\.\' prefixes on Windows, but allows standard UNC network paths such as '\\attacker.example.com\share\shot.png'—and the read-only tools desktop_perceive and desktop_vision (annotated readOnlyHint: true, so MCP clients auto-approve them and --confirm-write skips them) do not validate their 'path' parameter at all. On Windows, passing a UNC path to these tools or to browser_upload/browser_drag_files triggers an outbound SMB connection that leaks the user's Net-NTLMv2 password hash. Additionally, desktop_perceive and desktop_vision can read arbitrary files anywhere on disk despite being marked read-only, validate_screenshot_path does not canonicalize parent directories (allowing symlinks and macOS /private/etc paths to bypass protected-directory checks), and browser_screenshot does not enforce a .png extension so it can overwrite arbitrary user files (such as ~/.bashrc or ~/.ssh/authorized_keys) with PNG bytes.

    Fix: Block all UNC paths (any path starting with '\\' or Path::Component::Prefix(Prefix::UNC / VerbatimUNC)) across every file-accepting tool, validate paths passed to desktop_perceive and desktop_vision, canonicalize parent directories before checking protected locations, and require a .png extension without overwriting existing non-PNG files in browser_screenshot.

  4. MediumUnpinned runtime download of ONNX models without default SHA-256 verification

    crates/nuphus-mcp/src/models.rs:40

    On the first call to desktop_perceive (which is marked readOnlyHint: true and runs without write confirmation), ensure_models automatically downloads four OCR and YOLO model files (~30 MB) from mutable 'main' branches on third-party mirrors (hf-mirror.com and gitee.com) and loads the .onnx files directly into the native C++ ONNX Runtime. Unless the user manually sets undocumented NUPHUS_MCP_MODEL_SHA256_<FILE> environment variables, only a minimum file-size check is enforced before loading.

    Fix: Pin model download URLs to immutable commit hashes and hardcode expected SHA-256 digests for all default PaddleOCR and YOLO model artifacts so tampered downloads are rejected by default.

  5. LowStrict confirm mode (--confirm-write) relies on an AI-supplied argument instead of human approval

    crates/nuphus-mcp/src/tools/schemas.rs:55

    SECURITY.md recommends enabling --confirm-write (or NUPHUS_MCP_CONFIRM_WRITE=1) when the MCP client cannot be fully trusted or to stop a runaway agent from performing destructive actions. However, strict confirm mode does not prompt the human user; instead, every write tool declares a boolean 'confirm' property in its schema instructing the caller to set it to true, and rejected calls return an error telling the caller to pass "confirm": true. A prompt-injected AI agent or untrusted client can simply include "confirm": true in its tool arguments and execute any mouse, keyboard, app-launch, or browser write action without user consent.

    Fix: Require out-of-band user approval (such as a native OS confirmation dialog or MCP client-enforced human-in-the-loop tool approval) rather than checking a boolean parameter controlled by the LLM.

  6. LowBuild script extracts native ONNX Runtime libraries even when pinned SHA-256 fails

    crates/nuphus-mcp/build.rs:182

    During source builds (and CI release builds), build.rs downloads Microsoft.ML.OnnxRuntime from NuGet and checks it against NUPKG_SHA256, but if the hash does not match, ensure_nupkg falls back to nupkg_has_entries and still extracts and bundles the unverified native shared library (onnxruntime.dll/.so/.dylib) with only a compiler warning.

    Fix: Fail theONNX Runtime extraction (return None) whenever sha256(cache) does not match NUPKG_SHA256 instead of accepting archives based solely on entry names.

  7. LowTemporary full-screen captures are written to the shared temp directory with default permissions

    crates/nuphus-mcp/src/tools/desktop.rs:74

    When desktop_vision or desktop_perceive captures the screen, TempCapture::capture writes the PNG to std::env::temp_dir() (such as /tmp on Linux) using std::fs::write with a predictable nanosecond filename, without O_EXCL (create_new) or restrictive 0600 permissions. On multi-user Unix systems with a standard umask, other local users can read these temporary full-screen screenshots while OCR or cloud vision requests are in flight.

    Fix: Write temporary captures inside a user-private directory (such as dirs::data_dir() with 0700 permissions) or create temp files exclusively with mode 0600 (OpenOptionsExt::mode(0o600) and create_new(true)), or pass in-memory image buffers directly without writing temp files.