Skip to main content
Vulnerability Database/CVE-2026-61742

CVE-2026-61742: DBHub Database MCP Server CSRF Vulnerability

CVE-2026-61742 is a cross-site request forgery vulnerability in DBHub database MCP server that allows attackers to invoke MCP tools from a victim's browser via DNS rebinding. This article covers technical details, affected versions, and mitigation.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-61742 Overview

CVE-2026-61742 is a critical vulnerability in DBHub, a Model Context Protocol (MCP) server supporting Postgres, MySQL, SQL Server, Oracle, MariaDB, and SQLite. Versions prior to 0.22.5 expose an unauthenticated HTTP MCP endpoint when launched with HTTP transport mode. The server's origin validation reflects the validated Origin into Access-Control-Allow-Origin but fails to prevent DNS rebinding attacks. A malicious website can deterministically invoke DBHub MCP tools from the victim's browser without prompt injection or model involvement. The flaw is categorized under [CWE-306: Missing Authentication for Critical Function].

Critical Impact

Attackers can read, enumerate, and potentially modify database contents through a victim's browser, with no authentication or user interaction required.

Affected Products

  • DBHub versions prior to 0.22.5 running with HTTP transport mode (--transport http)
  • Deployments exposing the DBHub HTTP MCP endpoint to browsers or local network interfaces
  • Any backend database (Postgres, MySQL, SQL Server, Oracle, MariaDB, SQLite) connected to a vulnerable DBHub instance

Discovery Timeline

  • 2026-09-24 - CVE-2026-61742 published to NVD
  • 2026-09-30 - Last updated in NVD database

Technical Details for CVE-2026-61742

Vulnerability Analysis

DBHub's HTTP transport mode starts an MCP server that accepts tool invocations over HTTP. The server implements an origin check intended to block cross-origin browser requests. The check compares the Origin hostname against the Host hostname and, if they match, reflects the Origin value back in the Access-Control-Allow-Origin response header.

This control does not defend against DNS rebinding. An attacker-controlled domain can initially resolve to an attacker IP, then rebind to a victim-reachable DBHub address such as 127.0.0.1 or an internal host. After rebinding, requests originating from the attacker page carry matching Origin and Host values, both pointing at the attacker-controlled hostname. DBHub accepts the request and dispatches the embedded MCP tool call.

The impact depends on DBHub's configured database connection. The default demo setup exposes a SQLite database that attackers can read and write. Production deployments inherit the privileges of the configured database credentials, enabling data exfiltration, enumeration, and potential writes.

Root Cause

The root cause is reliance on hostname equality between Origin and Host as a sole access control for an unauthenticated administrative interface. HTTP header comparison does not establish the identity of the calling browser context when DNS can be manipulated between resolution events. The MCP endpoint lacks token-based authentication, session binding, or a Private Network Access check.

Attack Vector

An attacker hosts a malicious page under a domain configured with short DNS Time-to-Live (TTL) values. A victim on the same network as a DBHub HTTP server visits the page. Client-side JavaScript sleeps while DNS rebinds the attacker domain to the DBHub listener address. The script then issues MCP tool calls (for example, SQL execution tools) against the rebind target. DBHub validates the matching Origin and Host, executes the tool call, and returns results to the attacker page. Full technical details are available in the GitHub Security Advisory GHSA-fm8p-53ww-hf6w.

Detection Methods for CVE-2026-61742

Indicators of Compromise

  • HTTP requests to DBHub endpoints where the Host header contains an external or unexpected hostname rather than localhost or an internal DNS name
  • MCP tool invocations originating from browser User-Agent strings against DBHub listeners not intended for browser access
  • Database query logs showing unexpected read or write activity correlated with DBHub process execution

Detection Strategies

  • Inspect DBHub access logs for requests whose Origin and Host headers point to domains outside the organization
  • Monitor DNS resolver logs for short-TTL responses resolving to internal address ranges such as 127.0.0.1, 10.0.0.0/8, or 192.168.0.0/16
  • Alert on MCP tool call patterns executed in rapid succession from browser clients against local listeners

Monitoring Recommendations

  • Enable verbose request logging on the DBHub HTTP transport and forward logs to a centralized analytics platform
  • Correlate DBHub process network activity with user web browsing telemetry on endpoints running the server
  • Audit backend database query logs for operations originating from the DBHub service account outside expected workflows

How to Mitigate CVE-2026-61742

Immediate Actions Required

  • Upgrade DBHub to version 0.22.5 or later on all deployments using HTTP transport mode
  • If immediate patching is not possible, stop running DBHub with --transport http and switch to stdio transport
  • Bind the DBHub HTTP listener strictly to 127.0.0.1 and block external access at the host firewall

Patch Information

Version 0.22.5 fixes the issue by adding DNS rebinding protections to the HTTP transport. Review the GitHub Security Advisory GHSA-fm8p-53ww-hf6w for upgrade guidance and release notes.

Workarounds

  • Place DBHub behind a reverse proxy that enforces authentication and validates the Host header against an allowlist
  • Restrict DBHub database credentials to read-only accounts with the minimum privileges required for your use case
  • Configure browsers and endpoint controls to block Private Network Access requests from public web origins
  • Use DNS filtering to block resolution of untrusted domains returning RFC1918 or loopback addresses (DNS rebinding protection)
bash
# Upgrade DBHub to the patched release
npm install -g dbhub@0.22.5

# Or run with stdio transport instead of HTTP
dbhub --transport stdio

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.