Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate as SQLBot user
-
DeliveryConfigure datasource to internal PostgreSQL
-
ExploitCraft table_name invoking pg_read_file()
-
ExecutionSubmit to previewData endpoint
-
ImpactRead arbitrary server files in API response
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Parameterized queries, prepared statements
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Persistence The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Requires an authenticated SQLBot account (PR:L) able to create/configure a datasource that targets SQLBot's own internal PostgreSQL service. Exploitation further depends on the default tested trusted-loopback (pg_hba.conf trust/peer) authentication, under which the internal connection accepts invalid credentials and runs with PostgreSQL superuser privileges - a prerequisite for pg_read_file()/pg_read_binary_file()/pg_ls_dir() to succeed. The read-only policy does not block these because the payload remains a SELECT. Limiting factors: authentication is mandatory, the attacker must be able to reach and configure the internal PG datasource, and hardened deployments that disable trusted loopback or run PostgreSQL as a non-superuser substantially reduce or eliminate the filesystem-read impact. Affects versions prior to 1.9.0. |
| Impact | This is a genuine but moderate-priority confidentiality flaw, well-characterized by the vendor's CVSS 4.0 vector (6.0: AV:N/AC:H/AT:P/PR:L/UI:N/VC:H). The signals are internally consistent: network vector but authenticated (PR:L - the attacker must be a logged-in SQLBot user), high complexity plus a present attack requirement (AC:H/AT:P), reflecting that exploitation depends on the attacker being able to configure a datasource pointing at SQLBot's internal PostgreSQL AND on the default trusted-loopback authentication that grants superuser and accepts invalid credentials. Impact is confidentiality-only (VI:N/VA:N) - arbitrary server-side file read (/etc/passwd, /etc/hosts, config, credentials, secrets, source code), not write or RCE. There is no EPSS score, no CISA KEV listing, and no public exploit in the provided data, so this is 'no public exploit identified at time of analysis' rather than active exploitation. However, the GitHub Security Advisory (GHSA-vwjq-5h4h-x8g5), the fix commit, and the PR are all public, and the one-line change (client-controlled table_name → server-side table lookup by id) makes the injection mechanism trivially derivable, so the barrier to weaponization is low even without a published PoC. Net: real vulnerability worth patching, but gated by authentication and a specific PostgreSQL-loopback configuration rather than a wormable internet-facing critical. |
| Exploit ScenarioDerived | An authenticated SQLBot user creates a datasource pointing at SQLBot's internal PostgreSQL service (which under the default trusted-loopback config runs as superuser and accepts invalid credentials), then submits a crafted table_name to POST /api/v1/datasource/previewData that stays a SELECT under the read-only policy but invokes pg_read_file() / pg_ls_dir(). The API response returns filesystem contents such as /etc/passwd, configuration files, and application source code. No public exploit is identified, but the fix commit and advisory make the technique easy to reconstruct. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 17, 2026
SQL injection in SQLBot (dataease SQLBot) before version 1.9.0 lets an authenticated user read arbitrary files from the host filesystem by abusing the datasource preview endpoint. Because the client-supplied table_name value is interpolated directly into generated SQL without identifier validation, an attacker who can create or configure a datasource pointed at SQLBot's own internal PostgreSQL service can inject calls to pg_read_file(), pg_read_binary_file(), or pg_ls_dir() that remain valid SELECT statements and therefore slip past the read-only policy. In the default tested configuration the internal loopback connection uses PostgreSQL trust authentication, accepts invalid credentials, and executes with superuser rights, so files such as /etc/passwd and /etc/hosts - and potentially configuration files, credentials, and source code - can be returned in the API response; no public exploit code has been identified at time of analysis and the issue is fixed in 1.9.0. Authentication (PR:L) and a reachable/configurable internal datasource are prerequisites, and hardened deployments that disable trusted loopback or run PostgreSQL as a non-superuser largely eliminate the filesystem-read impact.
RemediationAI
Upgrade to SQLBot 1.9.0, which is the vendor-released patch for this issue (fix commit 76b5176b0e394740fd07c0d1769c0c792e8cb3b4, PR #1156, release https://github.com/dataease/SQLBot/releases/tag/v1.9.0; advisory https://github.com/dataease/SQLBot/security/advisories/GHSA-vwjq-5h4h-x8g5). If upgrading immediately is not possible, the most effective compensating control is to remove the default trusted-loopback authentication on SQLBot's internal PostgreSQL instance: replace pg_hba.conf trust/peer entries for loopback with scram-sha-256 (or md5) and set a strong password, which prevents the internal connection from accepting invalid credentials - the trade-off is that SQLBot's internal connection string must be updated to supply valid credentials, and any other local service relying on trust auth will break. A second, complementary control is to run SQLBot's internal PostgreSQL and its connecting role as a non-superuser, since pg_read_file(), pg_read_binary_file(), and pg_ls_dir() are superuser-only and will fail with insufficient-privilege errors; the trade-off is that legitimate administrative or maintenance tasks needing elevated privileges must be performed by a separate role. Additionally, restrict who can create or edit datasources within SQLBot (least privilege on the authenticated accounts that hold the PR:L privilege required for exploitation) and, where feasible, block the application from reaching its own database over loopback. Note that application-level read-only query policies should not be considered a mitigation here, because the injected payload remains a SELECT and is not blocked by that control.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
SQLBot is an LLM- and RAG-based Text-to-SQL system, and this flaw is a classic CWE-89 SQL injection rooted in unsafe identifier handling rather than a query-logic bug. The backend route POST /api/v1/datasource/previewData in backend/apps/datasource/crud/datasource.py builds dialect-specific SELECT statements by f-string interpolation of data.table.table_name (and conf.dbSchema) without quoting or validating the identifier, so a crafted table_name can terminate the intended object reference and splice in a function call. Because the injected payload still evaluates as a SELECT - for example invoking PostgreSQL superuser-only functions such as pg_read_file(), pg_read_binary_file(), or pg_ls_dir() - it is not blocked by the application's read-only policy, which only constrains query semantics and does not sandbox identifiers or function calls. Exploitation is compounded by the deployment's default trusted-loopback setup: the internal PostgreSQL connection uses pg_hba.conf trust (or peer) authentication, accepts invalid credentials, and runs with superuser privileges, which is exactly the privilege level PostgreSQL requires to call those file-access functions. The vendor fix (commit 76b5176b0e394740fd07c0d1769c0c792e8cb3b4, PR #1156) replaces client-supplied data.table.table_name with table.table_name resolved server-side from a CoreTable lookup by data.table.id, closing the injection path by no longer trusting the request-supplied identifier.
Know when PostgreSQL gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:H/AT:P/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
Authenticated user (PR:L) over network; AC:H/S:U reflect dependence on trusted-loopback superuser config; impact is arbitrary file read so C:H, no integrity or availability effect.
Primary rating from Vendor (github).
CVSS VectorVendor: github
Lifecycle Timeline
1DescriptionCVE.org
SQLBot is an intelligent Text-to-SQL system based on large language models and RAG. Prior to 1.9.0, the POST /api/v1/datasource/previewData endpoint in backend/apps/datasource/crud/datasource.py incorporates the client-controlled table_name value into generated SQL without safe identifier handling. An authenticated user can configure a datasource for SQLBot's internal PostgreSQL service and submit a crafted table_name that remains a SELECT operation under the read-only policy while invoking pg_read_file(), pg_read_binary_file(), or pg_ls_dir(). In the default tested trusted loopback authentication configuration, the internal connection accepts invalid credentials and executes with PostgreSQL superuser privileges, allowing filesystem content such as /etc/hosts and /etc/passwd to be returned in the previewData API response and potentially exposing configuration, credentials, authentication secrets, and source code. This issue is fixed in version 1.9.0.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
SQL injection exploits the way applications construct database queries by mixing user input directly into SQL statements.
More in PostgreSQL
View allPostgreSQL libpq functions PQescapeLiteral(), PQescapeIdentifier(), PQescapeString(), and PQescapeStringConn() improperl
An issue was discovered in Appsmith before 1.52. Rated critical severity (CVSS 9.8), this vulnerability is remotely expl
Argument injection vulnerability in PostgreSQL 9.2.x before 9.2.4, 9.1.x before 9.1.9, and 9.0.x before 9.0.13 allows re
Unauthenticated arbitrary file write in Splunk Enterprise (below 10.2.4 and 10.0.7) and Splunk Cloud Platform (below 10.
Unauthenticated SQL injection in Sangoma Switchvox SMB Edition 8.3 (build 104997) lets remote attackers execute arbitrar
PostgreSQL versions before 9.2.22, 9.3.18, 9.4.13, 9.5.8 and 9.6.4 are vulnerable to incorrect authentication flaw allow
The build_tablename function in pgsql.c in the PostgreSQL (aka pgsql) extension in PHP through 5.6.7 does not validate t
A vulnerability in the h2oai/h2o-3 REST API versions 3.46.0.4 allows unauthenticated remote attackers to execute arbitra
In PostgreSQL 9.3 through 11.2, the "COPY TO/FROM PROGRAM" function allows superusers and users in the 'pg_execute_serve
Unauthenticated SQL injection in Vendure Shop API allows remote attackers to execute arbitrary SQL commands against the
Parse Server is an open source http web server backend. Rated critical severity (CVSS 10.0), this vulnerability is remot
Hard-coded default PostgreSQL credentials shipped in the docker-compose.yaml of langgenius Dify through version 1.5.1 al
EUVD-2026-82562
NVD
CVE.org
EPSS
Vulnrichment
GitHub
Exploit-DB