Skip to main content

Postgres MCP Pro CVE-2026-85620

| EUVDEUVD-2026-71227 CRITICAL
Incorrect Authorization (CWE-863)
2026-09-04 VulnCheck GHSA-cm87-gp55-7cgj
9.2
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Reach MCP query channel (untrusted agent input)
  2. Delivery
    Craft SELECT with pg_read_file in FROM clause
  3. Exploit
    RangeFunction node skips allowlist check
  4. Execution
    PostgreSQL executes file-read function
  5. Impact
    Exfiltrate arbitrary host file contents

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V8 - Authorization Authorization logic validation
MITRE ATT&CK

1 technique across 1 tactic: Privilege Escalation

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Requires that the target run Postgres MCP Pro 0.3.0 with restricted mode enabled (the very control being bypassed) and that the attacker can submit SQL query text to the MCP server, e.g. through an LLM agent exposed to untrusted input. The file-reading function (pg_read_file/pg_read_binary_file) must be invoked from a FROM clause as a RangeFunction rather than a SELECT target. Limiting factors: the PostgreSQL role used by the server must retain EXECUTE on those functions (default for superuser/pg_read_server_files members), and readable files are constrained to those accessible to the PostgreSQL service account; deployments that revoke these functions or that expose the MCP endpoint only to fully trusted callers are not practically exploitable.

Impact

The vendor CVSS 4.0 vector (9.2, AV:N/AC:L/PR:N/UI:N/VC:H/SC:H) reflects a network-reachable, low-complexity read of high-value data with a scope/subsequent-system impact on the underlying host filesystem, which is a credible characterization of a restricted-mode bypass. No EPSS score, KEV listing, or public PoC is present in the provided data, so this is a high-severity-by-design issue rather than a confirmed mass-exploited one; the risk is concentrated in deployments that actually rely on restricted mode to expose the MCP server to untrusted or semi-trusted input (for example, an LLM agent processing attacker-influenced prompts). The most important caveat is the trust model: PR:N is only fair if the query channel is meant to be reachable by low-privileged/untrusted callers - where restricted mode is used as the sole safety boundary, any operator, even a mid-sized municipal IT team running an internal agent, should treat this as urgent and stop trusting restricted mode until patched, whereas a purely single-tenant local deployment behind authentication faces lower exposure. Impact is read-only (VI/VA:N), so this is confidentiality-focused, not an integrity or availability event.

Exploit ScenarioDerived

An attacker who can influence queries sent to a restricted-mode Postgres MCP Pro 0.3.0 server - for example via prompt injection against an LLM agent wired to the tool - submits 'SELECT * FROM pg_read_file('/etc/passwd')' or reads database credentials, .pgpass, or configuration files. Because RangeFunction nodes skip the allowlist check, the query executes and returns the file contents. No authenticated PostgreSQL session or user interaction beyond the query channel is required.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
No patch listed yet 0.4% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Sep 04, 2026

Arbitrary file read in Postgres MCP Pro 0.3.0 (crystaldba/postgres-mcp) lets attackers bypass restricted-mode SQL safeguards by invoking file-reading functions such as pg_read_file inside FROM-clause RangeFunction nodes, which the function-name allowlist fails to inspect. Any client able to submit queries to the MCP server can therefore read files accessible to the PostgreSQL service account despite the tool's safety controls. No public exploit identified at time of analysis, and the flaw is not in CISA KEV; the technique is described in a VulnCheck advisory and GitHub issue #178.

RemediationAI

No vendor-released patch version is identified in the available data - the references point to the project repository and an open GitHub issue (#178), not to a tagged fixed release, so upgrade guidance cannot cite a confirmed version; monitor https://github.com/crystaldba/postgres-mcp for a release that extends function-name validation to RangeFunction/FROM-clause nodes. As compensating controls: do not treat restricted mode as a sufficient boundary for untrusted input on 0.3.0; run the MCP server against a PostgreSQL role with least privilege and explicitly REVOKE EXECUTE on pg_read_file, pg_read_binary_file, pg_ls_dir and related filesystem/administrative functions (trade-off: breaks any legitimate feature relying on them); restrict network access to the MCP endpoint to trusted clients only (trade-off: reduces the untrusted-agent use case restricted mode was meant to enable); and run PostgreSQL under an OS account with minimal filesystem access so pg_read_file cannot reach sensitive files (trade-off: may limit legitimate COPY/import workflows). Review the VulnCheck advisory for authoritative guidance.

Affected VersionsENISA

postgres-mcp 0 ≤0.3.0

Affected Packages

euvd postgres_mcp no fix

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Postgres MCP Pro is a Model Context Protocol (MCP) server that brokers SQL access to a PostgreSQL database, typically for LLM-driven agents, and offers a 'restricted mode' meant to constrain what queries untrusted callers can run. The restriction is enforced in src/postgres_mcp/sql/safe_sql.py by parsing SQL and validating function names against an allowlist, but the parser walks only certain node types and does not apply function-name validation to RangeFunction nodes - the AST construct representing set-returning/table functions used in a FROM clause. This is a classic CWE-863 (Improper Authorization) gap: the authorization check exists but is not consistently applied across all code paths, so functions blocked in a SELECT target list (e.g. pg_read_file, pg_read_binary_file) pass validation when expressed as 'SELECT * FROM pg_read_file(...)'. The affected package is identified by CPE cpe:2.3:a:crystaldba:postgres-mcp:*:*:*:*:*:*:*:* at version 0.3.0.

Know when Postgres Mcp gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (VulnCheck) PRIMARY 9.2 CRITICAL
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:H/SI:N/SA:N
vuln.today AI 8.6 HIGH

Restricted mode is designed to gate untrusted query input, so PR:N is defensible; bypassing that authority to read host files is a scope change (S:C) with confidentiality-only impact (C:H, I/A:N).

3.1 AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:H/SI:N/SA:N

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
None
Vulnerable system: Availability
None
Subsequent system: Confidentiality
High
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

Postgres MCP Pro 0.3.0 contains a restricted-mode bypass vulnerability where function-name validation is not applied to RangeFunction nodes in FROM clauses. Attackers can execute file-reading functions like pg_read_file through FROM-clause syntax to read arbitrary files despite restricted-mode protections.

Executive ViewAI

Why It Matters

Postgres MCP Pro 0.3.0 contains an arbitrary file read vulnerability that allows attackers with query access to the MCP server to bypass the tool's built-in safety controls and read sensitive files from the database server host, including credentials, configuration files, and application data. Organizations using this tool face immediate risk of credential compromise and data exposure.

Business Impact: Severe
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: (1) Restrict MCP server network access via firewall to whitelisted trusted hosts; (2) Require multi-factor authentication for all MCP client connections; (3) Run the PostgreSQL service account with minimal filesystem permissions to limit readable files; (4) Enable database audit logging and file-access monitoring; (5) Isolate the MCP server on a segmented network with no internet egress; (6) Monitor query logs for suspicious FROM-clause function invocations. Plan immediate tool replacement as primary remediation.

Threat Intelligence Overview

EPSS Score
0.4%
Top 70% exploitable
Prevalence
Low
niche open-source PostgreSQL MCP server, limited but growing deployment
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC No
EPSS 0.4%
Patch available No
Active threat No
Deciding rule
CRITICAL severity
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Out-of-Cycle
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
Very High

Priority Score

46
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +46
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy