Tools
Chaterm Patches a Read-Only SQL Guard Bypass: Parenthesized and UNION Set Queries, Plus DML Smuggled Ahead of EXPLAIN
chaterm/Chaterm (3,016 stars), an open-source AI terminal for cloud and infrastructure management, merged PR #2484 on 2026-08-17 fixing its database-ai read-only guard, which failed to parse parenthesized and UNION set queries and accepted DML placed before an EXPLAIN SELECT; the fix also bounds unwrap iterations and handles VALUES CTEs. The guard is what stops a natural-language database agent from issuing writes against production. Anyone building an LLM-to-SQL path should read this as a template for how their own allowlist parser gets bypassed — set operations and EXPLAIN prefixes are the two holes.
Source
↳ Follow the thread