CVE-2026-130595: SQLBot PostgreSQL denylist bypass lets users read and write host files

SQLBot versions 1.10.0 through 1.10.3 contain a key mismatch that disables the PostgreSQL dangerous-function denylist, allowing authenticated users to read or write files on the database host via LLM-generated SQL.

Christopher Ort
By Christopher Ort · 3 min read
Share
A developer reviewing code on a laptop screen in a dimly lit office, with a PostgreSQL database diagram visible on a whiteboard in the background.
Image: AI-generated, i10X
On this page
  1. Quick Take
  2. In plain English
  3. What happened
  4. What you should do
  5. What it means
  6. Sources
i10X Quick Take

Quick Take

  1. 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’.
  2. Who is affected: Authenticated users with access to SQLBot workspaces connected to PostgreSQL datasources, especially when the database role has elevated privileges.
  3. 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.
  4. 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.
  5. 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
Christopher Ort

Christopher Ort

Christopher Ort handles SEO, AI agent workflows and PR & partnerships at i10x.ai, the all-in-one AI workspace built by i10X Global Pte. Ltd. in Singapore. He is a graduate of Friedrich-Alexander-Universität Erlangen-Nürnberg (FAU). He is the author of “The Style Penalty”, a study published on SSRN that analyses 1,576 evaluation decisions by four frontier AI models to show how AI-written CVs fare in automated hiring screens; the research has been covered by heise online and t3n.

Editor's picks

  1. Genesys Launches Standalone AI Agents and Arena, With Pricing Based on How Hard Each Task Is
  2. Seedance 2.5 4K Reaches Developers: 10-Bit Video up to 30 Seconds With 480p Draft Mode
  3. Perplexity Computer Adds Multiagent Mode, Where Up to 16 Agents on Rival Models Check Each Other
  4. Gemini Can Now Make Calls, Pay Bills and Shop, Free in Six Countries With Gemini 4 Hydrogen
  5. Hinton on Firing Line: AI Is Making ‘Alien Beings’ and Self-Regulation Is ‘Absurd’