Case · DiggingBeagle record

pgEdge read-only MCP query mode could run writes and contaminate pooled session state

A tool advertised as read-only trusted statement-prefix checks rather than a transaction and role boundary, allowing writes when PostgreSQL credentials retained write grants.

Scope

pgEdge Postgres MCP Server through 1.0.0 where query_database is enabled and the connecting DB role can write despite application read_only.

Assessment profile

Assessment method
Setting
research demonstration
Exploitation
demonstrated
Evidence
Grade B
Remediation
patch available
AI role
AGAINST AI
Basis and provenance

The maintainer reproduced DDL changes; version 1.1.0 adds single-statement execution and pooled-state reset, while actual deployed-tenant harm remains unknown. Classified as research_demonstration with exploit status demonstrated. Evidence grade B reflects the original paper or maintainer advisory and its stated limitations, not an independent audit of all deployments. Comparable realized harm is not established, so impact stays unrated; remediation status patch_available is limited to the cited experiment or affected software version. New source-specific boundary: The fixed dispatcher and pooled-connection reset address different effects: an immediate injected write and a writable session inherited by a later request.

Assessed Nov 15, 2026 using diggingbeagle.assessment/1.

At a glance

Mechanism and trust boundary

  1. 01

    Entry or starting condition

    An MCP query_database tool is labelled read_only while its pooled PostgreSQL role still has write grants.

    Boundary: attacker or research precondition

  2. 02

    Crossing the relevant boundary

    Statement smuggling or transaction/session commands bypass the application guard, and a changed session default can persist in the pool.

    Boundary: mechanism and authorization boundary

  3. 03

    Observed or reported result

    The maintainer reproduced DDL changes; version 1.1.0 adds single-statement execution and pooled-state reset, while actual deployed-tenant harm remains unknown.

    Boundary: measured outcome and evidentiary limit

Claims & evidence

CLM-ENR250-11The pgEdge read-only remediation combines single-statement extended-query execution with resetting the PostgreSQL session before returning it to the pool; a connection that cannot be safely reset must be discarded. A PostgreSQL login without database write grants remains a separate least-privilege boundary even when application-level read-only checks fail.supported

Basis: reported finding

Link to claim
CLM-R245-PGEDGE-READONLY-SQL-POOL-01The vendor reproduced table creation, alteration and deletion in disposable PostgreSQL and documented version 1.1.0 fixes including single-statement extended execution and connection-state reset.supported

Basis: reported finding

Link to claim
CLM-R245-PGEDGE-READONLY-SQL-POOL-02Unsupported SQL transaction and session variants could reach a multipstatement simple-query execution path, and altered connection settings could persist when the same pooled connection served another request.supported

Basis: reported finding

Link to claim
CLM-R246-PGEDGE-READONLY-SQL-POOL-BOUNDARYThe maintainer reproduced table creation, alteration and deletion against a disposable database while relying on application read_only; RESET ALL or DISCARD ALL could also leave a pooled PostgreSQL session writable for later requests.supported

Basis: reported finding

Link to claim

Unknowns and contradictions

  • An underlying PostgreSQL role with no write grants blocks the described writes independently. The advisory does not establish exploitation in production or new unauthorized read access.
  • No evidence here establishes the number of production victims or a broader failure rate outside the cited evaluation.

Sources and citation

Material revision history

  1. Nov 15, 2026 · Canonical change recorded · new in release · revision 251