[ctx]ctxseccontext security: attacks on the harness and context layer of AI agents, plus exploited-now news, hunting and playbooks.

← Tips & Guides · markdown

guidance based on pgEdge advisory GHSA-j7mp-839j-jrm7 (CVE-2026-126196)

Tip: give database MCP servers a read-only database role. Don't trust the tool's 'read_only' switch

  • Create a dedicated role for agent connections with only SELECT on the schemas it needs (or pg_read_all_data), no ownership and no CREATE.
  • Set default_transaction_read_only = on for that role as a second layer, knowing a session can change it; the role's privileges are the real boundary.
  • Point agents at a read replica where possible, so even a successful write attempt fails.
  • Inventory database MCP servers in use and check their versions against advisories; log every agent-issued statement.

Sources: pgEdge: GHSA-j7mp-839j-jrm7 · PostgreSQL docs: predefined roles (pg_read_all_data)