# CVE-2026-126196: pgEdge Postgres MCP Server read-only bypass via SQL injection

Source: https://junglewise.ai/threats/cve-2026-126196-pgedge-postgres-mcp-server-enables-sql-queries-against  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-11-12. Updated: 2026-11-12  
License: CC BY 4.0 with a link back

CVE-2026-126196 · Severity: high · CVSS 8.1 · Published 2026-11-12

pgEdge Postgres MCP Server provides AI assistants and compatible clients with SQL query capabilities against PostgreSQL databases. Prior to version 1.1.0, the read-only connection mode could be bypassed using transaction control statements or semicolon-separated SQL commands, allowing attackers to perform unauthorized database writes. This could compromise database integrity and availability for deployments relying on read-only mode as a security boundary.

Technologies: [pgEdge Postgres MCP Server](https://junglewise.ai/threats/technologies/pgedge-postgres-mcp-server). Vendors: [pgEdge](https://junglewise.ai/threats/vendors/pgedge).

## Quick answers

**Is CVE-2026-126196 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-126196 being exploited in the wild.

**How severe is CVE-2026-126196?** High severity, with a CVSS score of 8.1, published 12 November 2026.

**Which products and versions are affected?** pgEdge Postgres MCP Server prior to 1.1.0.

**Is there a fix for CVE-2026-126196?** Yes: fixed in 1.1.0. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-126196 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-126196?** Check whether you run pgEdge Postgres MCP Server at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- Fixed in 1.1.0

## Technical details

The vulnerability stems from two causes: (1) the textual guard checking for read-only statements only matched literal keywords and missed READ WRITE forms, and (2) non-SELECT statements were executed via pgx's Exec() method, which falls back to PostgreSQL's simple query protocol when no bind parameters are supplied, accepting multiple semicolon-separated statements in a single message. An attacker on a connection configured as read-only could append transaction control, BEGIN/COMMIT statements, or SET TRANSACTION READ WRITE to escape the restriction. The fix enforces the extended query protocol for all statements on read-only connections, which allows only one statement per message and rejects multi-statement requests at the PostgreSQL level.

## Affected products

- pgEdge Postgres MCP Server prior to 1.1.0

## Timeline

- 2026-11-12: disclosed

## References

- [https://github.com/pgEdge/pgedge-postgres-mcp/commit/b5b929305de7a22cd6ed7de8ae1be2ac90ca0868](https://github.com/pgEdge/pgedge-postgres-mcp/commit/b5b929305de7a22cd6ed7de8ae1be2ac90ca0868)
- [https://github.com/pgEdge/pgedge-postgres-mcp/pull/196](https://github.com/pgEdge/pgedge-postgres-mcp/pull/196)

## Related threats

- [pgEdge Postgres MCP Server write confirmation bypass in SQL classification](https://junglewise.ai/threats/cve-2026-126199-pgedge-postgres-mcp-server-enables-sql-queries-against)
- [pgEdge Postgres MCP Server SQL injection in pl-do custom tools](https://junglewise.ai/threats/cve-2026-126197-pgedge-postgres-mcp-server-enables-sql-queries-against)
- [pgEdge Postgres MCP Server SQL injection in count_rows](https://junglewise.ai/threats/cve-2026-125322-pgedge-postgres-mcp-server-enables-sql-queries-against)
- [pgEdge Postgres MCP Server rate limit bypass via X-Forwarded-For header spoofing](https://junglewise.ai/threats/cve-2026-125321-pgedge-postgres-mcp-server-enables-sql-queries-against)
- [pgEdge Postgres MCP Server DNS rebinding in HTTP transport](https://junglewise.ai/threats/cve-2026-125320-pgedge-postgres-mcp-server-enables-sql-queries-against)
