Quick Take
- What: SQLBot 1.10.0 through 1.10.3 fails to apply its PostgreSQL dangerous-function denylist because the code uses ‘postgresql’ as the key while lookups use ‘pg’.
- Who is affected: Authenticated users with access to SQLBot workspaces connected to PostgreSQL datasources, especially when the database role has elevated privileges.
- What to do: Limit SQLBot access to trusted users and connect it to PostgreSQL with a least-privileged role. The fix is merged in the source code, but no tagged release after v1.10.3 includes it yet.
- Impact: Attackers can steer LLM-generated SQL past the check_sql_read() guard to invoke pg_read_file, pg_write_file, lo_import or lo_export, reading or writing files on the database host.
- Fix status: Merged on November 5, 2026 in pull request #1439 (commit 67d213f). The latest tagged release is still v1.10.3.
In plain English
SQLBot lets people ask questions about their data in everyday language, and an AI writes the database query for them. It is supposed to block a short list of risky database commands that can read or write files on the server. Because of a naming mistake in the code, that block never worked for PostgreSQL databases. A logged-in user could get the AI to run those risky commands anyway. If your company runs SQLBot with PostgreSQL, limit who can use it until a fixed release is out; ordinary users of other apps do not need to do anything.
What happened
SQLBot maintains a dictionary called DS_SPECIFIC_DANGEROUS_FUNCTIONS that maps database types to lists of dangerous functions. The dictionary was keyed with ‘postgresql’, but the actual lookup in check_sql_read() uses the ds.type field, which for PostgreSQL is ‘pg’ (as defined in apps/db/constant.py). Because the keys did not match, the PostgreSQL denylist was never consulted, and statements containing pg_read_file, pg_write_file, lo_import or lo_export were allowed through.
The vulnerability was reported in GitHub issue #1438 on November 3, 2026, by researcher w5n4n. The reporter demonstrated that INSERT, COPY and dangerous-function calls that should have been blocked were accepted when SQLBot connected to PostgreSQL. A proof-of-concept showed that correcting the dialect key mapping locally caused the same statements to be blocked.
The affected code is in backend/apps/db/db.py, lines 1155 to 1182 in commit 96f06c7. The DS_SPECIFIC_DANGEROUS_FUNCTIONS table included entries for ‘mysql’, ‘doris’, ‘starrocks’, ‘postgresql’, ‘sqlserver’, ‘oracle’ and ‘hive’, but only ‘postgresql’ did not match the corresponding DB enum type.
What you should do
As of November 17, 2026, the latest tagged SQLBot release on GitHub is v1.10.3, so there is no packaged fixed version yet. Teams that build from source can apply commit 67d213f. The fix was merged in pull request #1439 on November 5, 2026 (commit 67d213f). The patch renames the ‘postgresql’ key to ‘pg’ and expands the PostgreSQL dangerous-function list to include pg_read_binary_file, pg_ls_dir and pg_stat_file. It also adds regression tests to ensure every dialect key in DS_SPECIFIC_DANGEROUS_FUNCTIONS matches a DB.type value and that PostgreSQL file functions are rejected.
If you cannot upgrade immediately, restrict SQLBot workspace access to trusted users and review the database role permissions for PostgreSQL datasources. Use a read-only role with minimal file-system access to limit the impact of any bypass.
What it means
This vulnerability allows an authenticated attacker to bypass SQLBot’s read-only and dangerous-statement protections for PostgreSQL. The impact depends on the privileges of the database role SQLBot uses. If the role has superuser or file-access privileges, an attacker can read sensitive files (such as /etc/passwd or database configuration files) or write arbitrary data to the server file system. The reporter rated it 5.3 (Medium, vector CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N), reflecting network access, high attack complexity, low privileges required and high confidentiality impact. The NVD entry lists it as medium severity with a score of 5.9, and VulnCheck scores it 6.0 under CVSS 4.0.
The vulnerability is classified under CWE-863 (Incorrect Authorization) and CWE-184 (Incomplete List of Disallowed Inputs). It affects SQLBot versions 1.10.0 through 1.10.3 inclusive.
SQLBot joins a run of AI data tools where a guard around model-written queries failed. Compare the SQL injection in the pgEdge Postgres MCP Server and the agent-device flaw that let remote callers read host files. New cases are tracked in our AI Security hub.
Sources
- CVE-2026-130595 NVD entry
- SQLBot issue #1438
- Fix commit 67d213f
- Vulnerable code (db.py lines 1155 to 1182)
- VulnCheck advisory



