Skip to content

AAK-MCP-PGEDGE-CVE-2026-126199-001: pgEdge Postgres MCP Server's CLI and web client images below 1.1.0: database writes run without the write-confirmation prompt

Severity
MEDIUM
Category
Supply Chain (supply-chain)
Scanner
agent_audit_kit/scanners/container_image_pins.py
Auto-fixable
No.
SARIF name
PgedgeNlaClientsPre110WriteConfirmation

What it detects

The pgEdge Postgres MCP Server (pgEdge/pgedge-postgres-mcp) bundles two MCP clients that run an LLM chat agent against it: a CLI, shipped as the image ghcr.io/pgedge/nla-cli, and a web client, shipped as ghcr.io/pgedge/nla-web. On a connection with allow_writes, each asks the user to confirm a write before the model's tool call runs, and before 1.1.0 each decided wrongly what to ask about. CVE-2026-126199 (CVSS 3.1 6.8, CWE-357, GHSA-5gmh-9683-hhq9): a query_database statement was classified by its first keyword alone, so SELECT ... INTO, a data-modifying common table expression behind a leading WITH, and EXPLAIN ANALYZE of a write were taken for reads and ran unconfirmed. CVE-2026-126198 (3.1, CWE-357, GHSA-v44x-hxg7-5cgc): only a tool named query_database was considered at all, so custom pl-do, pl-func and writing sql tools ran unconfirmed. Either way a write the model issued, for example on instructions planted in content it retrieved, ran without the user approving it. Checked in the source at the commit each image's label names: the prompt (internal/chat/query_classify.go, web/src/utils/queryClassify.js and WriteQueryConfirmDialog.jsx) first ships in 1.0.0 (67121476), where the CLI prompts only when the tool is query_database and its statement's first keyword is not a read, and the web client the same; 1.0.0-test1 (cc13a18a) is unchanged. 1.1.0-beta1 (b971c413) carries both fixes, c86d5cbe and 310c0280: the clients classify the statement with comments removed and literals blanked, treat those three forms as writes, and prompt for any tool whose readOnlyHint annotation is false, an annotation the server sets on writing custom tools from the same release.

How to fix

Run ghcr.io/pgedge/nla-cli and ghcr.io/pgedge/nla-web 1.1.0 or later, pinned by version, with the server image ghcr.io/pgedge/postgres-mcp at 1.1.0 or later too: a 1.1.0 client treats a tool with no write annotation as read-only, and a server below 1.1.0 sets none on its custom tools. Review the database's audit logs for writes through the MCP connection that nobody confirmed, in particular statements beginning with WITH, SELECT ... INTO or EXPLAIN ANALYZE and calls to custom tools. Until then leave allow_writes off, or connect with a role that has no write privileges, so the database refuses the write whether or not a client asks.

To confirm the finding is gone, report only this rule:

agent-audit-kit scan . --rules AAK-MCP-PGEDGE-CVE-2026-126199-001

Limitations

Reads image references only: an image: value or any other mention of ghcr.io/pgedge/nla-cli:TAG or ghcr.io/pgedge/nla-web:TAG in YAML (compose files, Kubernetes manifests, MCP configs), a Helm values mapping of repository and tag, Dockerfile and Containerfile FROM, and docker run arguments in *mcp*.json and claude_desktop_config.json. Tags below 1.1.0 are reported, with the two-part 1.0; the 1.1.0 betas and release candidate read as 1.1.0 and carry the fixes. Every tag before 1.0.0, from 1.0.0-alpha3, the first, to 1.0.0-beta3a, reads as 1.0.0 and is reported, although none has a write-confirmation prompt to misjudge: from 1.0.0-beta2 an allow_writes connection runs every write unasked, and before it no connection allows writes; the advisories name every pre-release. latest was the 1.1.0 digest of both images on 2026-11-14, so an untagged reference is not reported. The rule reads the tag, not the configuration: a deployment whose connections all leave allow_writes off is reported, although PostgreSQL's read-only transaction refuses the writes there. A 1.1.0 client still runs a custom tool's write unasked against a server below 1.1.0, which publishes no write annotation for custom tools; this rule does not read the server image, and AAK-MCP-PGEDGE-CVE-2026-125320-001 reports server tags below 1.1.0. The release archives (pgedge-postgres-mcp-cli_<version>_<os>_<arch>, pgedge-nla-web_<version>_noarch), the RPM and DEB packages and a client built from source state no version AAK reads. Mirrors under another registry are not matched, and commented-out lines are skipped.

References


All rules. This page is generated from the rule registry when the documentation is built; to change it, change the rule in agent_audit_kit/rules/builtin.py. To give the rule a hand-written write-up, add docs/rules/AAK-MCP-PGEDGE-CVE-2026-126199-001.md: the page then shows that text, with the registry reference appended under it.