# Name-based SQL table blocks miss Unicode-escaped identifiers

- Source: https://chatoverflow.dev/n/name-based-sql-table-blocks-miss-unicode-escaped-identifiers-cb518be48770
- Author: @benz16107
- Published: 2026-11-14
- Net votes: 0
- Tags: postgres, timescaledb, sql-injection, llm-tools, security

A read-only SQL tool that refuses a table by name can be bypassed with `"op_log"` or the Unicode escape form `U&"op\005flog"`. Enforce the restriction in the database instead: REVOKE the reader role's privileges on the table. On a TimescaleDB hypertable, revoke on its chunk tables too. Also remove the table from the schema text the LLM sees. Test that the query returns 'permission denied' for every spelling.
