First Published: 2026/12/03
Last Updated: 2026/12/03
Summary
The AIDB MCP endpoint (edb-endpoints) authenticates each request by opening a Postgres connection with the HTTP Basic user name and password that the MCP client sends. The endpoint always opens that connection from the database host itself, over the server's Unix socket (or 127.0.0.1 when there is no socket directory), as the operating system user that runs Postgres. When a pg_hba.conf line that matches the connection uses a method that does not check a password, such as peer, trust or ident, Postgres admits the connection whatever password the client sent, and the endpoint treats the request as authenticated.
A client that can reach the MCP endpoint can therefore run SQL, through the built-in execute_sql tool and the rest of the tool catalog, as any role that such a line admits. A peer line for local connections, common in packaged installs (for example local all postgres peer, or local all enterprisedb peer for EDB Postgres Advanced Server), admits the role named after the operating system user that runs Postgres. That role is normally a superuser, which can read and change all data and run operating system commands as the Postgres service account.
The MCP endpoint is off by default (edb.endpoints_mcp_enabled = off) and listens on 127.0.0.1 by default. When it listens only on loopback, any local operating system user on the database host can exploit the flaw. When it serves remote MCP clients, anyone who can reach the endpoint port (8765 by default) can exploit the flaw.
EDB Postgres AI Agent Factory for AWS Marketplace versions 1.0 through 1.3 ship AIDB 7.8.0 with the MCP endpoint enabled, served on port 8765, and a local all enterprisedb peer line, so any password works for the enterprisedb superuser. Instances launched with the listing's AWS CloudFormation template accept connections on port 8765 only from the Amazon Bedrock AgentCore Gateway, which signs in with its own credential. Instances launched from the AMI without the template, or whose security group allows other sources to reach port 8765, are exposed to those sources.
Vulnerability details
CVE-ID: CVE-2026-141488
CVSS Base Score: 9.2 Critical
CVSS Temporal Score: Undefined
CVSS Environmental Score: Undefined
CVSS Vector: CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Affected products and versions
- Affected Product: AIDB (the
edb-endpointsMCP endpoint), on every supported Postgres distribution and platform - Affected Versions: AIDB 7.7.0 through 7.8.0 with
edb.endpoints_mcp_enabled = onand apg_hba.confline that matches the endpoint's connections and uses a method that does not check a password, such aspeer,trustorident - Affected Product: EDB Postgres AI Agent Factory for AWS Marketplace
- Affected Versions: 1.0 through 1.3
- Not Affected: AIDB deployments with the MCP endpoint disabled, which is the default; AIDB 7.9.0 and later; EDB Postgres AI Agent Factory 1.4 and later
- Hybrid Manager
-fullimages and default Hybrid Manager deployments preload AIDB, and CloudNativePG-vectorimages include AIDB, but none of them turn the MCP endpoint on. They are affected only ifedb.endpoints_mcp_enabledhas been set toon.
Remediation/fixes
Impacted users must upgrade to a fixed version. Starting with AIDB 7.9.0, the endpoint checks which pg_hba.conf method admitted each connection before it runs any of the caller's SQL, and closes the connection unless the method checked a password (scram-sha-256, md5, password, ldap, radius, pam or bsd). The client gets the error PostgreSQL admitted it without checking a password.
| Product | VRMF | Remediation/First Fix |
|---|---|---|
| AIDB | 7.7.0 through 7.8.0 | Update to AIDB 7.10.0 together with the latest minor release of your Postgres server (for example 18.7), or to AIDB 7.9.0 if you stay on an earlier minor release (for example 18.6) |
| EDB Postgres AI Agent Factory for AWS Marketplace | 1.0 through 1.3 | Update AIDB on existing instances to 7.9.0 or later, or replace them with instances of version 1.4 or later |
Before you upgrade, follow the AIDB 7.9.0 upgrade notes:
- Give each role that MCP clients use a password, and change the
pg_hba.conflines that match the endpoint's connections to a password method such asscram-sha-256. Otherwise every tool call fails after the upgrade. - From AIDB 7.9.0 the endpoint requires PostgreSQL 16 or later, because the check reads
SYSTEM_USER. On PostgreSQL 14 and 15 the endpoint does not start. If you run the MCP endpoint on PostgreSQL 14 or 15, upgrade Postgres or turn the endpoint off. - AIDB 7.10.0 loads only on the latest minor release of PostgreSQL, EDB Postgres Advanced Server and EDB Postgres Extended Server (for example 18.7), and its packages don't declare this requirement. Update the server packages together with AIDB, or Postgres can fail to start. If you need to stay on an earlier minor release, such as 18.6, update AIDB to 7.9.0, which still runs on it.
- After the new package is installed, run
ALTER EXTENSION aidb UPDATEin each database where AIDB is installed.
On EDB Postgres AI Agent Factory instances launched with the CloudFormation template, no pg_hba.conf change is needed: the template already has a scram-sha-256 line for the mcp_agent role, and AIDB 7.9.0 and later refuses connections that the enterprisedb peer line admits. Either update the stack to the version 1.4 AMI, or upgrade the EDB Postgres Advanced Server packages together with AIDB on the existing instance. Upgrading AIDB alone can leave Postgres unable to start.
Mitigation
Until you can upgrade, reduce exposure by doing one or more of the following:
- Turning off the MCP endpoint: set
edb.endpoints_mcp_enabled = offand reload the configuration. The running endpoint stops. - Removing
peer,trustandidentlines that match the endpoint's connections frompg_hba.conf, so that every role an MCP client can name must give a password. The endpoint connects over the local Unix socket, solocallines apply, andhostlines for127.0.0.1apply when there is no socket directory. These lines also admit local administrators, so plan how administrators will connect before you remove them. - Allowing network access to the endpoint port only from trusted MCP clients. On EDB Postgres AI Agent Factory, keep port 8765 open only to the AgentCore Gateway connection security group, as the CloudFormation template sets it.
References
- CVSS Calculator v4.0
- CWE-305 Authentication Bypass by Primary Weakness
- AIDB 7.9.0 release notes
- MCP endpoint: Passwords are always checked
Related information
Acknowledgement
Source: Reported to EDB by kta1kri through the EDB Vulnerability Disclosure Program.
Change history
- 2026/12/03: Original Copy Published
Disclaimer
This document is provided on an "as is" basis and does not imply any kind of guarantee or warranty, including the warranties of merchantability or fitness for a particular use. Your use of the information on the document is at your own risk. EDB reserves the right to change or update this document at any time. Customers are therefore recommended to always view the latest version of this document.