Description
An OS command injection weakness in the read-only enforcement of the SQL validation component in Amazon awslabs postgres-mcp-server before 1.1.7 might allow an unauthenticated actor to execute operating system commands on the host of a self-managed PostgreSQL server by placing a crafted COPY ... TO PROGRAM statement into content that is processed when an authenticated user interacts with the MCP server in its default read-only mode.



To remediate this issue, users should upgrade to version 1.1.7 or later.
Published: 2026-09-09
Score: 9 Critical
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

An OS command injection flaw exists in the read‑only enforcement of the SQL validation component of Amazon awslabs postgres‑MCP Server before version 1.1.7. By inserting a specially crafted COPY … TO PROGRAM statement into content that is processed when an authenticated user interacts with the MCP server in its default read‑only mode, an unauthenticated actor can execute arbitrary operating system commands on the host running the self‑managed PostgreSQL server. Based on the description, it is inferred that the attacker builds the statement within data that the server validates, thereby bypassing the read‑only restriction. The vulnerability is a classic command injection (CWE‑78) and demonstrates a failure of read‑only enforcement (CWE‑184). It can compromise confidentiality, integrity, and availability if an attacker gains full control of the host.

Affected Systems

AWS Labs postgres‑MCP Server versions prior to 1.1.7 deployed on self‑managed PostgreSQL servers are affected. The issue is resolved in 1.1.7 and newer releases. Users running earlier versions should plan an upgrade.

Risk and Exploitability

The CVSS score of 9 indicates a high severity flaw, but the EPSS score is not available and the vulnerability is not listed in CISA KEV. The likely attack vector is injecting the COPY … TO PROGRAM statement into data that the MCP server processes during a session. Based on the description, it is inferred that the attacker must feed a crafted statement to the MCP server’s SQL validator, which typically occurs when the server processes content from an authenticated session. Therefore, the risk is mitigated by enforcing strict authenticated access and network isolation, but the high CVSS suggests that once the attack vector is exposed, exploitation could lead to full system compromise.

Generated by OpenCVE AI on September 9, 2026 at 21:17 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade AWS Labs postgres‑MCP Server to version 1.1.7 or later.
  • Restrict network access to the MCP server endpoint to trusted hosts only and enforce authentication before allowing any SQL processing.
  • Monitor server logs for suspicious COPY … TO PROGRAM statements and apply additional host hardening to prevent execution of unauthorized commands.

Generated by OpenCVE AI on September 9, 2026 at 21:17 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Wed, 09 Sep 2026 19:45:00 +0000

Type Values Removed Values Added
Description An OS command injection weakness in the read-only enforcement of the SQL validation component in Amazon awslabs postgres-mcp-server before 1.1.7 might allow an unauthenticated actor to execute operating system commands on the host of a self-managed PostgreSQL server by placing a crafted COPY ... TO PROGRAM statement into content that is processed when an authenticated user interacts with the MCP server in its default read-only mode. To remediate this issue, users should upgrade to version 1.1.7 or later.
Title Read-only enforcement bypass enabling operating system command execution in the SQL validation component of Amazon awslabs postgres-mcp-server
First Time appeared Aws
Aws aws Labs Postgres Mcp Server
Weaknesses CWE-184
CWE-78
CPEs cpe:2.3:a:aws:aws_labs_postgres_mcp_server:*:*:*:*:*:*:*:*
Vendors & Products Aws
Aws aws Labs Postgres Mcp Server
References
Metrics cvssV3_1

{'score': 9.6, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H'}

cvssV4_0

{'score': 9, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H'}


Subscriptions

Aws Aws Labs Postgres Mcp Server
cve-icon MITRE

Status: PUBLISHED

Assigner: AMZN

Published:

Updated: 2026-09-09T19:37:17.985Z

Reserved: 2026-09-09T15:23:09.508Z

Link: CVE-2026-87911

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-09-09T20:21:02.017

Modified: 2026-09-09T20:21:02.017

Link: CVE-2026-87911

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-09-09T21:30:15Z

Weaknesses
  • CWE-184

    Incomplete List of Disallowed Inputs

  • CWE-78

    Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')