CVE-2026-87911
nicheOS command injection in Amazon awslabs postgres-mcp-server read-only mode
CVE-2026-87911 is an OS command injection flaw (CWE-78) in the SQL validation component that enforces read-only mode in Amazon's awslabs postgres-mcp-server, where an incomplete statement filter (CWE-184) allows COPY ... TO PROGRAM statements to slip past the read-only check. An unauthenticated attacker places a crafted COPY ... TO PROGRAM statement into content processed by the server; when an authenticated user interacts with the MCP server in its default read-only mode, the self-managed PostgreSQL server executes the statement, running attacker-chosen operating system commands on the database host. The CVSS 4.0 score of 9 (critical) reflects high impact to confidentiality, integrity, and availability on both the vulnerable system and downstream systems, effectively amounting to remote command execution on the PostgreSQL host with the database process's privileges. Affected users are those running postgres-mcp-server before 1.1.7 against self-managed PostgreSQL servers that permit COPY ... TO PROGRAM; deployments against fully managed database services without program execution are not exposed to host-level command execution. No public proof-of-concept or confirmed in-the-wild exploitation is known, the issue is not in CISA KEV, and version 1.1.7 contains the fix.
What to do: Upgrade postgres-mcp-server to version 1.1.7 or later. Until patched, restrict the PostgreSQL role used by the server so it cannot execute server-side programs (e.g., lacks pg_execute_server_program), limit which content can be routed into MCP sessions, and review database hosts for unexpected command execution. Inventory deployments to confirm which instances run pre-1.1.7 versions, since exploitation requires an authenticated user session in default read-only mode to trigger.
| Amazon (AWS Labs) postgres-mcp-server | before 1.1.7 (fixed in 1.1.7) |
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
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.
- Weakness
- CWE-78, CWE-184
- 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
In the news0 stories
No ingested article mentions this CVE yet.