CVE-2026-61742
DBHub HTTP transport DNS rebinding allows unauthenticated browser-origin SQL execution
DBHub is a database MCP server for Postgres, MySQL, SQL Server, Oracle, MariaDB, SQLite. Versions prior to 0.22.5 expose an unauthenticated HTTP MCP endpoint when started with the documented HTTP transport mode, for example --transport http --port 8080. The HTTP server attempts to protect browser-origin access by checking whether the Origin hostname equals the Host hostname, then reflecting the validated Origin into Access-Control-Allow-Origin. This does not stop DNS rebinding. After an attacker-controlled hostname rebinds to a victim-accessible DBHub HTTP server, both Origin and Host can contain the attacker-controlled hostname, so DBHub accepts the request and dispatches MCP tool calls. As a result, a malicious website can deterministically invoke DBHub MCP tools from the victim's browser without prompt injection or model involvement. With the default demo configuration this can read and write the demo SQLite database; with a real configured database, the same primitive can read, enumerate, and potentially write database contents depending on DBHub's configured tool permissions and database credentials. Version 0.22.5 fixes the issue.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Exploit likelihood
What each source reports
CVE List Score used
9.3
DBHub HTTP transport DNS rebinding allows unauthenticated browser-origin SQL execution
DBHub is a database MCP server for Postgres, MySQL, SQL Server, Oracle, MariaDB, SQLite. Versions prior to 0.22.5 expose an unauthenticated HTTP MCP endpoint when started with the documented HTTP transport mode, for example --transport http --port 8080. The HTTP server attempts to protect browser-origin access by checking whether the Origin hostname equals the Host hostname, then reflecting the validated Origin into Access-Control-Allow-Origin. This does not stop DNS rebinding. After an attacker-controlled hostname rebinds to a victim-accessible DBHub HTTP server, both Origin and Host can contain the attacker-controlled hostname, so DBHub accepts the request and dispatches MCP tool calls. As a result, a malicious website can deterministically invoke DBHub MCP tools from the victim's browser without prompt injection or model involvement. With the default demo configuration this can read and write the demo SQLite database; with a real configured database, the same primitive can read, enumerate, and potentially write database contents depending on DBHub's configured tool permissions and database credentials. Version 0.22.5 fixes the issue.
- Record
CVE-2026-61742- CVSS 4.0
- 9.3 Critical
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 - Weakness
- CWE-306, CWE-346
- Updated
- 2026-11-02
EUVDEUVD-2026-86320
9.3
DBHub is a database MCP server for Postgres, MySQL, SQL Server, Oracle, MariaDB, SQLite. Versions prior to 0.22.5 expose an unauthenticated HTTP MCP endpoint when started with the documented HTTP transport mode, for example --transport http --port 8080. The HTTP server attempts to protect browser-origin access by checking whether the Origin hostname equals the Host hostname, then reflecting the validated Origin into Access-Control-Allow-Origin. This does not stop DNS rebinding. After an attacker-controlled hostname rebinds to a victim-accessible DBHub HTTP server, both Origin and Host can contain the attacker-controlled hostname, so DBHub accepts the request and dispatches MCP tool calls. As a result, a malicious website can deterministically invoke DBHub MCP tools from the victim's browser without prompt injection or model involvement. With the default demo configuration this can read and write the demo SQLite database; with a real configured database, the same primitive can read, enumerate, and potentially write database contents depending on DBHub's configured tool permissions and database credentials. Version 0.22.5 fixes the issue.
- Record
EUVD-2026-86320- CVSS 4.0
- 9.3 Critical
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 - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-fm8p-53ww-hf6w
9.3
DBHub HTTP transport DNS rebinding allows unauthenticated browser-origin SQL execution
Summary
DBHub 0.21.2 exposes an unauthenticated HTTP MCP endpoint when started with the documented HTTP transport mode, for example --transport http --port 8080.
The HTTP server attempts to protect browser-origin access by checking whether the Origin hostname equals the Host hostname, then reflecting the validated Origin into Access-Control-Allow-Origin. This does not stop DNS rebinding. After an attacker-controlled hostname rebinds to a victim-accessible DBHub HTTP server, both Origin and Host can contain the attacker-controlled hostname, so DBHub accepts the request and dispatches MCP tool calls.
As a result, a malicious website can deterministically invoke DBHub MCP tools from the victim's browser without prompt injection or model involvement. With the default demo configuration this can read and write the demo SQLite database; with a real configured database, the same primitive can read, enumerate, and potentially write database contents depending on DBHub's configured tool permissions and database credentials.
Recommended severity: High. It may become Critical when HTTP transport is connected to production or broadly privileged database credentials.
Details
Affected target:
- Package:
@bytebase/dbhub - Version tested:
0.21.2 - Repository commit tested:
72adfdcf7bcfe46b25edbc776ce096006eba9b02 - Affected mode: HTTP transport (
--transport http) - Default package transport: stdio
- Not affected by this specific browser-origin vector: stdio transport
Relevant code path: src/server.ts
The HTTP server installs a middleware that:
- reads
req.headers.origin; - extracts the hostname from
req.headers.host; - parses the hostname from
Origin; - rejects only when the two hostnames differ;
- reflects the validated
OriginintoAccess-Control-Allow-Origin; - enables credentials with
Access-Control-Allow-Credentials: true.
Relevant code:
const origin = req.headers.origin;
if (origin) {
const host = (req.headers.host ?? '').split(':')[0].toLowerCase();
try {
const originHost = new URL(origin).hostname.toLowerCase();
if (originHost !== host) {
return res.status(403).json({
error: 'Forbidden',
message: 'Origin does not match Host header (DNS rebinding protection)',
});
}
} catch {
return res.status(400).json({ error: 'Bad Request', message: 'Malformed Origin header' });
}
}
res.header('Access-Control-Allow-Origin', origin || 'http://localhost');
res.header('Access-Control-Allow-Methods', 'GET, POST, OPTIONS');
res.header('Access-Control-Allow-Headers', 'Content-Type, Mcp-Session-Id');
res.header('Access-Control-Allow-Credentials', 'true');
This blocks a simple cross-origin request such as:
Host: localhost:8080
Origin: http://attacker.example
However, it accepts the DNS rebinding request shape:
Host: dbhub-rebind.example:8080
Origin: http://dbhub-rebind.example
In a browser attack, the victim visits an attacker-controlled page such as http://dbhub-rebind.example:8080. The attacker initially resolves that hostname to the attacker's web server, serves JavaScript, then rebinds the hostname to the victim-accessible DBHub address on the same port. The browser can then send requests where the request host and browser origin are both the attacker-controlled hostname. The current check treats that as trusted because it verifies equality, not membership in an explicit allowed-host or allowed-origin policy.
No authorization token, per-server secret, or CSRF-style capability is required before /mcp accepts JSON-RPC tool calls in HTTP mode. Therefore, once the rebinding request shape passes the hostname equality check, the browser can invoke the same MCP tools as an intended HTTP MCP client.
Suggested remediation:
- Bind HTTP transport to
127.0.0.1by default and require explicit opt-in for0.0.0.0or non-loopback hosts. - Add an explicit allowed-hosts policy instead of accepting…
- Record
GHSA-fm8p-53ww-hf6w- CVSS 4.0
- 9.3 Critical
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 - Weakness
- CWE-306, CWE-346
- Updated
- 2026-11-02
NVD
9.3
DBHub is a database MCP server for Postgres, MySQL, SQL Server, Oracle, MariaDB, SQLite. Versions prior to 0.22.5 expose an unauthenticated HTTP MCP endpoint when started with the documented HTTP transport mode, for example --transport http --port 8080. The HTTP server attempts to protect browser-origin access by checking whether the Origin hostname equals the Host hostname, then reflecting the validated Origin into Access-Control-Allow-Origin. This does not stop DNS rebinding. After an attacker-controlled hostname rebinds to a victim-accessible DBHub HTTP server, both Origin and Host can contain the attacker-controlled hostname, so DBHub accepts the request and dispatches MCP tool calls. As a result, a malicious website can deterministically invoke DBHub MCP tools from the victim's browser without prompt injection or model involvement. With the default demo configuration this can read and write the demo SQLite database; with a real configured database, the same primitive can read, enumerate, and potentially write database contents depending on DBHub's configured tool permissions and database credentials. Version 0.22.5 fixes the issue.
- Record
CVE-2026-61742- CVSS 4.0
- 9.3 Critical
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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - Weakness
- CWE-306, CWE-346
- Updated
- 2026-11-02
OSVGHSA-fm8p-53ww-hf6w
9.3
DBHub HTTP transport DNS rebinding allows unauthenticated browser-origin SQL execution
Summary
DBHub 0.21.2 exposes an unauthenticated HTTP MCP endpoint when started with the documented HTTP transport mode, for example --transport http --port 8080.
The HTTP server attempts to protect browser-origin access by checking whether the Origin hostname equals the Host hostname, then reflecting the validated Origin into Access-Control-Allow-Origin. This does not stop DNS rebinding. After an attacker-controlled hostname rebinds to a victim-accessible DBHub HTTP server, both Origin and Host can contain the attacker-controlled hostname, so DBHub accepts the request and dispatches MCP tool calls.
As a result, a malicious website can deterministically invoke DBHub MCP tools from the victim's browser without prompt injection or model involvement. With the default demo configuration this can read and write the demo SQLite database; with a real configured database, the same primitive can read, enumerate, and potentially write database contents depending on DBHub's configured tool permissions and database credentials.
Recommended severity: High. It may become Critical when HTTP transport is connected to production or broadly privileged database credentials.
Details
Affected target:
- Package:
@bytebase/dbhub - Version tested:
0.21.2 - Repository commit tested:
72adfdcf7bcfe46b25edbc776ce096006eba9b02 - Affected mode: HTTP transport (
--transport http) - Default package transport: stdio
- Not affected by this specific browser-origin vector: stdio transport
Relevant code path: src/server.ts
The HTTP server installs a middleware that:
- reads
req.headers.origin; - extracts the hostname from
req.headers.host; - parses the hostname from
Origin; - rejects only when the two hostnames differ;
- reflects the validated
OriginintoAccess-Control-Allow-Origin; - enables credentials with
Access-Control-Allow-Credentials: true.
Relevant code:
const origin = req.headers.origin;
if (origin) {
const host = (req.headers.host ?? '').split(':')[0].toLowerCase();
try {
const originHost = new URL(origin).hostname.toLowerCase();
if (originHost !== host) {
return res.status(403).json({
error: 'Forbidden',
message: 'Origin does not match Host header (DNS rebinding protection)',
});
}
} catch {
return res.status(400).json({ error: 'Bad Request', message: 'Malformed Origin header' });
}
}
res.header('Access-Control-Allow-Origin', origin || 'http://localhost');
res.header('Access-Control-Allow-Methods', 'GET, POST, OPTIONS');
res.header('Access-Control-Allow-Headers', 'Content-Type, Mcp-Session-Id');
res.header('Access-Control-Allow-Credentials', 'true');
This blocks a simple cross-origin request such as:
Host: localhost:8080
Origin: http://attacker.example
However, it accepts the DNS rebinding request shape:
Host: dbhub-rebind.example:8080
Origin: http://dbhub-rebind.example
In a browser attack, the victim visits an attacker-controlled page such as http://dbhub-rebind.example:8080. The attacker initially resolves that hostname to the attacker's web server, serves JavaScript, then rebinds the hostname to the victim-accessible DBHub address on the same port. The browser can then send requests where the request host and browser origin are both the attacker-controlled hostname. The current check treats that as trusted because it verifies equality, not membership in an explicit allowed-host or allowed-origin policy.
No authorization token, per-server secret, or CSRF-style capability is required before /mcp accepts JSON-RPC tool calls in HTTP mode. Therefore, once the rebinding request shape passes the hostname equality check, the browser can invoke the same MCP tools as an intended HTTP MCP client.
Suggested remediation:
- Bind HTTP transport to
127.0.0.1by default and require explicit opt-in for0.0.0.0or non-loopback hosts. - Add an explicit allowed-hosts policy instead of accepting…
- Record
GHSA-fm8p-53ww-hf6w- CVSS 4.0
- 9.3 Critical
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 - Weakness
- CWE-306, CWE-346
- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
@bytebase/dbhubnpm |
through 0.22.4 | 0.22.5 |
@bytebase/dbhubnpm |
before 0.22.5 | 0.22.5 |
History
| Recorded | Changed | Sources |
|---|---|---|
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2026-61742 is a critical vulnerability (CVSS 9.3) in Bytebase Dbhub, published September 24, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.20%, the 10th percentile. Fixed in @bytebase/dbhub 0.22.5.
References
github.com/bytebase/dbhub/security/advisories/GHSA-fm8p-53ww-hf6w
nvd.nist.gov/vuln/detail/CVE-2026-61742
github.com/bytebase/dbhub/pull/340
github.com/bytebase/dbhub/commit/5bf5c3242a22e94871dfdf53913c84a5025b7381
github.com/bytebase/dbhub/releases/tag/v0.22.6
github.com/advisories/GHSA-fm8p-53ww-hf6w
github.com/bytebase/dbhub
Left out here: the rest of 2 source descriptions. The JSON record has them.