CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-61742

CVE-2026-61742: DNS Rebinding to Unauthenticated SQL Execution in DBHub

Alon Barad
Alon Barad
Software Engineer

Sep 25, 2026·7 min read·24 visits

Executive Summary (TL;DR)

Unauthenticated remote SQL execution on local DBHub database servers via client-side DNS rebinding.

A critical DNS rebinding vulnerability in DBHub (associated with GHSA-fm8p-53ww-hf6w) allows unauthenticated remote attackers to execute arbitrary SQL queries against local and internal databases. By exploiting a relative origin validation check within the HTTP transport middleware, an attacker can bypass same-origin protections via DNS rebinding. This allows malicious external websites to send JSON-RPC commands to the local DBHub service to read, write, and exfiltrate database contents. The issue affects all versions of DBHub prior to 0.22.5.

Vulnerability Overview

DBHub operates as a Model Context Protocol (MCP) server designed to interface artificial intelligence models and external clients with relational databases including PostgreSQL, MySQL, SQL Server, Oracle, MariaDB, and SQLite. When initialized in the documented HTTP transport mode, DBHub exposes an unauthenticated HTTP service listening on a configured port (such as 8080). This architecture opens up a critical attack surface, as any local or network client can dispatch commands to the /mcp endpoint without verifying credentials.\n\nTo defend against malicious cross-origin interactions in web browsers, the developers implemented a security middleware intended to enforce Same-Origin policies. This middleware verifies whether the HTTP request's Origin header matches the Host header. The core design assumption was that mismatched headers would block unauthorized cross-origin requests originating from external malicious websites.\n\nHowever, this defense mechanism relies on relative comparisons of client-controlled headers rather than absolute host validation. Because the browser sets the Host and Origin headers based on the current domain it believes it is interacting with, a DNS rebinding attack can completely circumvent this verification step. The vulnerability, tracked as CVE-2026-61742, allows unauthenticated remote attackers to execute arbitrary SQL commands against databases connected to the DBHub server.

Root Cause Analysis

The root cause of CVE-2026-61742 resides in the origin-to-host relative validation logic within src/server.ts. When a standard browser makes a cross-origin request to a different domain, the browser enforces the Same-Origin Policy (SOP). If a script on http://malicious.com attempts to query http://localhost:8080, the browser automatically sets the Host header to localhost:8080 and the Origin header to http://malicious.com. The server's relative validation detects the mismatch and correctly issues an HTTP 403 Forbidden response.\n\nIn a DNS rebinding scenario, the attacker circumvents this browser mechanism by controlling both the DNS resolution of a domain and the serving infrastructure. The attacker registers a domain, such as rebind.attacker.com, with a low Time-To-Live (TTL) value. When the victim visits the attacker's site, the domain initially resolves to the attacker's malicious web server, which loads a script into the victim's browser context.\n\nOnce the script is running, the attacker's DNS server changes the A record for rebind.attacker.com to point to the loopback address 127.0.0.1. The script then initiates an HTTP POST request to http://rebind.attacker.com:8080/mcp. Because the browser associates the request with the origin http://rebind.attacker.com:8080, it sets both the Host header to rebind.attacker.com:8080 and the Origin header to http://rebind.attacker.com. When the request arrives at the local DBHub server, the middleware checks if rebind.attacker.com matches rebind.attacker.com. Because they are identical, the validation passes, allowing access to the MCP endpoint.\n\nmermaid\ngraph LR\n A["Attacker Site"] -->|"1. Load malicious JS"| B["Victim Browser"]\n A -.->|"2. Rebind DNS to 127.0.0.1"| C["DNS Server"]\n B -->|"3. POST /mcp (Host/Origin: rebind.com)"| D["Local DBHub (127.0.0.1)"]\n D -->|"4. Execute arbitrary SQL"| E["Target Database"]\n

Code-Level Analysis and Patch Verification

An investigation of the vulnerable codebase in DBHub version 0.21.2 reveals how the validation check was structured in src/server.ts. The implementation extracted the Origin and Host headers and compared them directly after dropping port information. If they matched, the server dynamically reflected the untrusted origin back into the response's Access-Control-Allow-Origin and enabled Access-Control-Allow-Credentials. This dynamic reflection allowed the attacker's client-side script to read the response payload, facilitating data exfiltration.\n\ntypescript\n// Vulnerable logic in src/server.ts (v0.21.2)\nconst origin = req.headers.origin;\nif (origin) {\n const host = (req.headers.host ?? '').split(':')[0].toLowerCase();\n try {\n const originHost = new URL(origin).hostname.toLowerCase();\n if (originHost !== host) {\n return res.status(403).json({\n error: 'Forbidden',\n message: 'Origin does not match Host header (DNS rebinding protection)',\n });\n }\n } catch {\n return res.status(400).json({ error: 'Bad Request', message: 'Malformed Origin header' });\n }\n}\n\nres.header('Access-Control-Allow-Origin', origin || 'http://localhost');\nres.header('Access-Control-Allow-Credentials', 'true');\n\n\nThe patch implemented in version 0.22.5 (commit 5bf5c3242a22e94871dfdf53913c84a5025b7381) completely restructures this validation. Instead of comparing two client-supplied strings for relative equality, the updated code maintains a strict allowlist of authorized hostnames. The server now validates both the Host header and the Origin header against an absolute set of allowed hosts (allowedHosts), which defaults to loopback addresses like localhost and 127.0.0.1 unless explicitly overridden using --allowed-hosts. This ensures that an arbitrary external domain name, even if consistent across both headers, will be rejected immediately.\n\nThis patch is complete as it eliminates the reliance on relative comparisons and moves to an explicit allowlist design. Even if an attacker successfully rebinds a domain name to 127.0.0.1, the server will reject the incoming request because the Host header will contain the rebound domain name, which is not present in the default loopback allowlist.

Exploitation Methodology

Exploitation of CVE-2026-61742 requires three core prerequisites: the DBHub instance must be running in HTTP transport mode, the attacker must have a vector to execute JavaScript in the victim's browser (such as a malicious webpage or compromised ad), and the victim's browser must be able to reach the DBHub service on the local network or loopback interface. No prior authentication, API keys, or active sessions are needed to interact with the target /mcp endpoint.\n\nWhen the victim visits the malicious site, the script executes a classic DNS rebinding sequence, waiting for the DNS cache of the browser or OS to expire so that the domain points to 127.0.0.1. Once the rebinding is successful, the script sends an HTTP POST request containing a standard JSON-RPC payload to /mcp. This request requests DBHub to list its connected databases or run arbitrary SQL commands.\n\nBecause DBHub's vulnerable middleware validates the match and returns the Access-Control-Allow-Origin header matching the rebound domain, the browser permits the script to read the database response. This allows the attacker to systematically exfiltrate database schemas, execute read queries to extract data, or run write queries to manipulate the database. The entire process occurs silently in the background without any visible indications to the user.

Technical Impact Assessment

The security impact of CVE-2026-61742 is exceptionally high, as reflected by its CVSS v4.0 score of 9.3. An attacker who successfully exploits this vulnerability gains full, unauthenticated control over any database connected to the compromised DBHub server. This includes the ability to execute arbitrary SQL statements under the privileges of the configured database user, allowing for read, write, and administrative actions.\n\nIn development environments, DBHub is frequently configured with elevated database privileges to allow developers to run migrations and view system schemas. Exploitation under these circumstances can lead to the deletion of tables, modification of critical application records, or the exfiltration of sensitive production data mirrors. Additionally, if the database engine supports functions that interact with the host system (such as PostgreSQL's PROGRAM COPY command or SQLite's loadable extensions), this vulnerability could be chained to achieve arbitrary remote code execution (RCE) on the developer's workstation.\n\nFurthermore, because DBHub acts as an MCP server, compromise of this service breaks the integrity of AI-assisted development systems. Malicious actors could inject manipulated database schemas or poisoned data into the context window of local LLMs, potentially leading to the generation of insecure code or backdoored database migrations.

Remediation and Defense-in-Depth

Remediating CVE-2026-61742 requires upgrading the @bytebase/dbhub dependency to version 0.22.5 or later. The update implements robust host-header validation that enforces a default allowlist of loopback addresses, preventing rebinding attacks. If immediate upgrading is not feasible, operators must implement strict mitigation strategies to secure the endpoint.\n\nOne effective workaround is to restrict the DBHub service binding. Instead of binding to all interfaces (0.0.0.0), ensure the server binds strictly to the loopback interface (127.0.0.1). While this does not prevent local DNS rebinding from a browser on the same host, it reduces the network-level attack surface. Additionally, developers can configure local firewall rules to block unauthorized cross-origin requests or run DBHub inside a containerized environment with isolated network namespaces.\n\nFor enterprise deployments where DBHub must be accessed over a network, it should never be exposed directly to the internet in HTTP mode. Administrators should deploy a reverse proxy, such as Nginx or Caddy, to handle SSL termination and enforce strong access controls, including Basic Authentication, IP white-listing, or Client Certificate authentication (mTLS). The proxy should also explicitly validate the incoming Host header and discard any requests bearing unexpected hostnames.

Official Patches

BytebaseDBHub Fix Pull Request (#340)

Fix Analysis (1)

Technical Appendix

CVSS Score
9.3/ 10
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Affected Systems

@bytebase/dbhubDBHub Server (HTTP transport mode)

Affected Versions Detail

Product
Affected Versions
Fixed Version
@bytebase/dbhub
Bytebase
< 0.22.50.22.5
AttributeDetail
CWE IDCWE-346
Attack VectorNetwork
CVSS v4.0 Score9.3
EPSS ScoreN/A (Published 2026)
ImpactUnauthenticated arbitrary SQL Execution / Information Disclosure
Exploit StatusProof-of-Concept
KEV StatusNot Listed

MITRE ATT&CK Mapping

T1190Exploit Public-Facing Application
Initial Access
CWE-346
Origin Validation Error

The software does not properly control or validate the origin of a request, allowing attackers to bypass same-origin protections.

Known Exploits & Detection

GitHub Security AdvisoryFull proof-of-concept details and threat explanation for local DNS rebinding.

References & Sources

  • [1]GitHub Security Advisory GHSA-fm8p-53ww-hf6w
  • [2]NVD CVE-2026-61742 Details
  • [3]DBHub v0.22.6 Release Notes

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•2 days ago•CVE-2026-16454
4.3

CVE-2026-16454: Object-Level Authorization Bypass in Eclipse hawkBit Direct Device Integration Controller

CVE-2026-16454 is an object-level authorization bypass vulnerability (CWE-284, CWE-862) in Eclipse hawkBit versions 1.0.3 and prior. The flaw exists within the Direct Device Integration (DDI) REST controller (hawkbit-ddi-resource), where endpoints responsible for enumerating software module metadata and serving firmware binaries fail to verify whether the requested software module is assigned to the authenticated device. Consequently, any device with valid credentials (such as a TargetToken or GatewayToken) can enumerate software module identifiers and download arbitrary firmware artifacts across the entire tenant namespace.

Amit Schendel
Amit Schendel
11 views•9 min read
•2 days ago•CVE-2026-62284
8.6

CVE-2026-62284: Remote Code Execution and SSRF via Unsanitized Kubeconfig in OSAC Operator

CVE-2026-62284 (GHSA-5w5g-j6hw-6p8f) is a code injection and server-side request forgery vulnerability in the console-proxy component of the OSAC Operator. The RemoteConfigResolver parses Kubernetes Secrets containing kubeconfig files via clientcmd.RESTConfigFromKubeConfig without sanitizing execution-related fields. An attacker with RBAC permissions to create or modify labeled Secrets in monitored namespaces can supply a malicious exec credential plugin, resulting in arbitrary command execution within the console-proxy pod.

Amit Schendel
Amit Schendel
8 views•8 min read
•2 days ago•CVE-2026-62361
5.5

CVE-2026-62361: Authenticated SQL Injection and Table Access Control Bypass in Listmonk Subscriber Export

CVE-2026-62361 (GHSA-xgjr-7j9q-2h4r) is an authenticated SQL injection and authorization bypass vulnerability in listmonk, an open-source, self-hosted newsletter and mailing list manager written in Go. In versions prior to 6.2.0, the subscriber export endpoint (GET /api/subscribers/export) directly interpolates user-supplied SQL filter expressions into a PostgreSQL query without invoking the table allowlist validation function (validateQueryTables). Consequently, authenticated users possessing the subscribers:sql_query and subscribers:get_all permissions can bypass relational access controls, execute arbitrary subqueries against restricted tables such as users and settings, and modify database state via writable Common Table Expressions (CTEs).

Alon Barad
Alon Barad
10 views•11 min read
•2 days ago•CVE-2026-28385
5.0

CVE-2026-28385: Server-Side Request Forgery in Canonical LXD Image Import

CVE-2026-28385 (GHSA-3gq2-x4qg-p4g6) is a Server-Side Request Forgery (SSRF) vulnerability in Canonical LXD versions 4.12 through 6.9. An authenticated user possessing the can_create_images entitlement can force the LXD daemon to execute arbitrary outbound HTTP and HTTPS requests via the /1.0/images API endpoint. Due to the absence of egress destination validation, an attacker can probe host loopback services, RFC 1918 private network segments, and cloud Instance Metadata Services (IMDS) from the network position of the privileged LXD daemon.

Amit Schendel
Amit Schendel
10 views•9 min read
•2 days ago•GHSA-9J25-MM2H-2F76
9.9

CVE-2026-48750: Arbitrary File Write on Host via exec-output Symlink in Canonical LXD and Incus

Canonical LXD and LXC Incus contain an arbitrary file write vulnerability (CWE-73 / CWE-59) in the `/1.0/instances/<name>/exec` REST API endpoint. When an instance is unpacked from an image archive, top-level symbolic links are extracted directly onto the host filesystem within the instance storage directory. If a crafted image includes a symbolic link named `exec-output` pointing to an arbitrary host path, invoking the execution endpoint with `record-output: true` causes the privileged host daemon to follow the symlink and write command output files directly to the target host directory. An authenticated attacker with permissions to import images and execute commands can exploit this flaw to write controlled content to sensitive host directories such as `/etc/cron.d`, resulting in arbitrary code execution on the host as `root`.

Alon Barad
Alon Barad
8 views•12 min read
•2 days ago•GHSA-VGHH-5RFX-XHQ8
9.9

CVE-2026-48749: Arbitrary Host File Read and Write via Malicious Image Symlink in Canonical LXD and Incus

CVE-2026-48749 (tracked as GHSA-vghh-5rfx-xhq8 for LXD and GHSA-2q3f-q5pq-g8wv for Incus) is a critical container escape vulnerability in the Canonical LXD and Linux Containers Incus system container managers. By importing a specially crafted container image archive containing duplicate tar member headers, an authenticated attacker can replace the instance rootfs directory with a symbolic link pointing to the underlying host root filesystem. When performing file operations on a stopped container, the privileged forkfile helper binary resolves the symbolic link without confinement and chroots directly into the host filesystem, granting arbitrary root-level file read and write access.

Amit Schendel
Amit Schendel
8 views•9 min read