Skip to main content

SQLBot EUVDEUVD-2026-82562

| CVE-2026-53556 MEDIUM
SQL Injection (CWE-89)
2026-09-17 security-advisories@github.com
6.0
CVSS 4.0 · Vendor: github
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Authenticate as SQLBot user
  2. Delivery
    Configure datasource to internal PostgreSQL
  3. Exploit
    Craft table_name invoking pg_read_file()
  4. Execution
    Submit to previewData endpoint
  5. Impact
    Read 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.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.4% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

SQLBot < 1.9.0

Affected Packages

euvd sqlbot fix: 1.9.0

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

Vendor (github) PRIMARY 6.0 MEDIUM
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
vuln.today AI 5.3 MEDIUM

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.

3.1 AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N
4.0 AV:N/AC:H/AT:P/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (github).

CVSS VectorVendor: github

Attack Vector
Network
Attack Complexity
High
Attack Requirements
Present
Privileges Required
Low
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
None
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

1
Patch available
Sep 17, 2026 - 23:04 EUVD

DescriptionCVE.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

EPSS Score
0.4%
Top 68% exploitable
Prevalence
Low
niche emerging open-source LLM Text-to-SQL tool, limited production footprint
Data Quality
6 sources
Confidence: High

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.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.4%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

30
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +30
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

SQL injection exploits the way applications construct database queries by mixing user input directly into SQL statements.

CVE-2025-1094 HIGH POC
8.1 Feb 13

PostgreSQL libpq functions PQescapeLiteral(), PQescapeIdentifier(), PQescapeString(), and PQescapeStringConn() improperl

CVE-2024-55964 CRITICAL POC
9.8 Mar 26

An issue was discovered in Appsmith before 1.52. Rated critical severity (CVSS 9.8), this vulnerability is remotely expl

CVE-2013-1899 MEDIUM POC
6.5 Apr 04

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

CVE-2026-20253 CRITICAL POC
9.8 Jun 10

Unauthenticated arbitrary file write in Splunk Enterprise (below 10.2.4 and 10.0.7) and Splunk Cloud Platform (below 10.

CVE-2026-9586 CRITICAL POC
9.3 Jul 17

Unauthenticated SQL injection in Sangoma Switchvox SMB Edition 8.3 (build 104997) lets remote attackers execute arbitrar

CVE-2017-7546 CRITICAL
9.8 Aug 16

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

CVE-2015-1352 MEDIUM POC
5.0 Mar 30

The build_tablename function in pgsql.c in the PostgreSQL (aka pgsql) extension in PHP through 5.6.7 does not validate t

CVE-2024-10553 CRITICAL POC
9.8 Mar 20

A vulnerability in the h2oai/h2o-3 REST API versions 3.46.0.4 allows unauthenticated remote attackers to execute arbitra

CVE-2019-9193 HIGH POC
7.2 Apr 01

In PostgreSQL 9.3 through 11.2, the "COPY TO/FROM PROGRAM" function allows superusers and users in the 'pg_execute_serve

CVE-2026-40887 CRITICAL POC
9.1 Apr 14

Unauthenticated SQL injection in Vendure Shop API allows remote attackers to execute arbitrary SQL commands against the

CVE-2022-24760 CRITICAL POC
10.0 Mar 12

Parse Server is an open source http web server backend. Rated critical severity (CVSS 10.0), this vulnerability is remot

CVE-2025-56157 CRITICAL POC
9.8 Dec 18

Hard-coded default PostgreSQL credentials shipped in the docker-compose.yaml of langgenius Dify through version 1.5.1 al

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy