A security flaw in pgEdge Postgres MCP Server allowed attackers to exploit DNS rebinding to read database schemas and query results from a user’s locally running server. The vulnerability, tracked as CVE-2026-125320, affected all versions prior to 1.1.0 when the HTTP transport was enabled.
Quick Take
- What: pgEdge Postgres MCP Server did not validate the Origin header on HTTP requests, enabling DNS rebinding attacks.
- Who is affected: Users running version 1.0.0 or earlier with HTTP transport enabled on a machine that also runs a browser.
- What to do: Upgrade to version 1.1.0 or later. Deployments serving the web client under a real hostname must configure
http.allowed_originsorPGEDGE_HTTP_ALLOWED_ORIGINS. - Severity: Medium (CVSS 5.3), requires user interaction and high attack complexity.
- Status: Patched in version 1.1.0 released September 4, 2026.
In plain English
The pgEdge Postgres MCP Server is a developer tool that lets AI assistants query PostgreSQL databases. A security hole let attackers trick a user’s web browser into connecting to the server running on their own computer and reading database information. The attacker would point a domain they control at the user’s local machine, and the browser would treat the local server as part of the attacker’s site. This only affected users who turned on the HTTP transport feature and visited an attacker’s website.
What you should do: If you use this tool with HTTP transport enabled, upgrade to version 1.1.0, otherwise you can ignore this.
What happened
The pgEdge Postgres MCP Server enables SQL queries against PostgreSQL databases through Model Context Protocol compatible clients. Prior to version 1.1.0, the HTTP transport did not validate the Origin header on incoming requests.
An attacker could exploit this by serving a web page from a domain they control, then repointing that domain to resolve to 127.0.0.1. When a user visited the attacker’s page, the browser would connect to the user’s own machine while still treating the page as belonging to the attacker’s domain. Because the request appeared same-origin to the browser, no CORS preflight was sent and the page could read responses from the locally running server.
The practical exposure was that a malicious page could reach a locally running server and issue MCP requests to read schemas and execute queries against configured databases. The issue affected deployments with the HTTP transport enabled on a machine that also ran a browser. The default stdio transport was not reachable through this attack path.
The vulnerability was documented in issue #231 on August 6, 2026, and fixed in pull request #232 on August 7, 2026. The fix was released in version 1.1.0 on September 4, 2026.
What you should do
Upgrade to version 1.1.0 or later. The fixed version validates the Origin header and refuses unexpected origins with HTTP 403 Forbidden.
With no origins configured, the server accepts loopback origins only (localhost, 127.0.0.1, ::1, either scheme, any port), which covers local use and the bundled web client unchanged.
Deployments that serve the web client under a real hostname must list that origin in the new http.allowed_origins setting or the PGEDGE_HTTP_ALLOWED_ORIGINS environment variable. Without this configuration, browser requests will be refused. Listing any origin replaces the loopback default rather than adding to it.
Requests carrying no Origin header are unaffected, so command line clients, scripts and other non-browser callers need no change.
As a workaround, do not enable the HTTP transport. The default stdio transport is not reachable from a browser. Where HTTP is required, bind the listener to an interface a browser on the same machine cannot reach, or place it behind a proxy that rejects requests carrying an unexpected Origin.
What it means
The Model Context Protocol specification requires servers using the Streamable HTTP transport to validate the Origin header on all incoming connections to prevent DNS rebinding attacks. The pgEdge Postgres MCP Server did not implement this requirement in versions prior to 1.1.0.
The vulnerability is rated Medium severity with a CVSS score of 5.3 (CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N). The attack complexity is high and requires user interaction, but no privileges are required and the confidentiality impact is high.
The fix adds origin-validation middleware that wraps the entire HTTP handler chain, covering /health, the LLM proxy routes, and the MCP endpoint. Validation runs ahead of authentication so hostile pages are refused before any credential is examined. The MCP endpoint returns a JSON-RPC error response with a null id when rejecting a request, which the transport specification explicitly permits.



