Skip to main content

SQLBot EUVDEUVD-2026-82564

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

Attack ChainAIDerived

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

  1. Recon
    Authenticate to SQLBot as low-privilege user
  2. Delivery
    POST malicious sheet["tableName"] to /api/v1/datasource/
  3. Exploit
    Payload stored without identifier sanitization
  4. Install
    DELETE /api/v1/datasource/{id} triggers cleanup SQL
  5. C2
    Second-order SQLi executes in PostgreSQL
  6. Execute
    COPY TO PROGRAM runs OS commands as postgres
  7. Impact
    Container command execution and compromise

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 and delete Excel-type datasources through /api/v1/datasource/. Exploitation is second-order and multi-step: the attacker must first store a crafted sheet["tableName"] value during datasource creation, then trigger the DELETE path so the stored value is interpolated into cleanup SQL. Reaching OS command execution further depends on the postgres process/role having sufficient privileges to invoke COPY TO PROGRAM (a superuser or pg_execute_server_program-granted role). Limiting factors: valid credentials are needed (not unauthenticated), the two-request timing/state dependency raises attack complexity (AC:H/AT:P), and only versions prior to 1.9.0 are affected - v1.9.0 sanitizes the identifier to Chinese/alphanumeric characters only.

Impact

This is a genuine high-severity issue, but its real-world urgency is tempered by several gating factors that the raw 7.7 CVSS 4.0 score alone does not convey. The vendor vector (CVSS:4.0/AV:N/AC:H/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H) captures the full-impact outcome - arbitrary OS command execution as the postgres process via PostgreSQL COPY TO PROGRAM (VC:H/VI:H/VA:H) - while honestly reflecting that it is neither trivial nor unauthenticated: PR:L requires a valid authenticated SQLBot account, AC:H and AT:P reflect the multi-step, second-order nature (a malicious value must be stored during datasource creation and only detonates on a later delete, and reaching COPY TO PROGRAM depends on the postgres role having the necessary privileges). No EPSS score, no CISA KEV listing, and no public exploit code are present in the supplied intelligence, so this is 'no public exploit identified at time of analysis' - a real-but-not-yet-widely-weaponized RCE. The chief signal aligning across all sources is that the fix is confirmed: a specific commit (5d5a92a) adding identifier sanitization, a tagged v1.9.0 release, and a GitHub Security Advisory (GHSA-vxwj-843f-9c9g). Bottom line: prioritize patching for any exposed SQLBot instance because the outcome is container RCE, but the authentication requirement and second-order complexity make mass, opportunistic exploitation less likely than the CVSS number suggests.

Exploit ScenarioDerived

An authenticated SQLBot user submits an Excel datasource via POST /api/v1/datasource/ containing a crafted sheet["tableName"] carrying malicious SQL rather than a safe identifier, which SQLBot stores verbatim. When that datasource is later deleted via DELETE /api/v1/datasource/{id}, the stored value is interpolated into cleanup SQL and executed by PostgreSQL, allowing the attacker to invoke COPY TO PROGRAM and run arbitrary OS commands as the postgres process inside the SQLBot container. No public exploit code is identified, but the fix commit reveals the exact sanitization gap, making reconstruction straightforward.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.3% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Sep 17, 2026

Authenticated SQL injection in SQLBot before 1.9.0 allows a user with a valid account to achieve operating-system command execution inside the SQLBot container. The attacker submits a crafted sheet["tableName"] value to POST /api/v1/datasource/, SQLBot stores it unsanitized, and the value is later interpolated into datasource cleanup SQL executed by PostgreSQL when that datasource is deleted via DELETE /api/v1/datasource/{id}; a second-order injection that can reach PostgreSQL COPY TO PROGRAM and run arbitrary commands with the privileges of the postgres process. Exploitation is gated by valid credentials, a two-request state dependency (raising attack complexity, AC:H/AT:P), and the postgres role's ability to invoke COPY TO PROGRAM; there is no public exploit identified at time of analysis, and only deployments running releases prior to 1.9.0 are affected.

RemediationAI

Upgrade SQLBot to version 1.9.0 or later, which is the vendor-released patch and sanitizes sheet-derived table identifiers to Chinese/alphanumeric characters only (see https://github.com/dataease/SQLBot/releases/tag/v1.9.0 and the fix commit https://github.com/dataease/SQLBot/commit/5d5a92a5266e62da7de4a84ffc8317498497b193). If immediate upgrade is not possible, compensating controls should target the two gating conditions: restrict creation and deletion of Excel-type datasources to a small set of trusted accounts (the endpoint requires only PR:L, so tightening roles removes the attacker's foothold, at the cost of blocking legitimate self-service datasource use), and reduce the postgres role's power by revoking superuser and the pg_execute_server_program membership from the account SQLBot uses, which prevents COPY TO PROGRAM from being reachable but may break other administrative features that rely on elevated privileges. Running SQLBot's database connection through a least-privilege role scoped to its own schema, and placing the container's postgres process behind an OS-level sandbox or non-root user with no shell, limits the blast radius of the COPY TO PROGRAM step should it still be reachable. Note that no public exploit code has been identified, so these workarounds are precautionary rather than responses to observed attacks; monitor the vendor advisory https://github.com/dataease/SQLBot/security/advisories/GHSA-vxwj-843f-9c9g for updates.

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

The root cause is CWE-89, improper neutralization of special elements used in an SQL command, realized here as a second-order (stored) injection rather than a direct one. SQLBot is a Text-to-SQL system built on LLMs and RAG that can register an Excel file as a datasource; during upload the application derives a table name from the sheet name. In versions prior to 1.9.0, the code path in backend/apps/datasource/api/datasource.py built that identifier as f"{sheet_name}_{sha256(uuid4())[:10]}" with no validation of the sheet name, so an attacker-supplied sheet["tableName"] containing SQL metacharacters and quote-breaking syntax was persisted verbatim. The injection only fires later: when the datasource is removed, the stored identifier is string-interpolated into the cleanup SQL that drops/cleans the backing table, and PostgreSQL parses and executes the attacker's payload with the privileges of the postgres process. Because PostgreSQL's COPY ... TO PROGRAM / FROM PROGRAM feature can spawn a shell command as the database server user, a successful injection escalates from SQL execution to arbitrary OS command execution inside the SQLBot container. The upstream fix (commit 5d5a92a) adds the new helper plus a call to filter_string(sheet_name) and prefixes generated identifiers with "excel_", stripping everything except Chinese characters, a-z, A-Z and 0-9 via the regex [^\u4e00-\u9fa5a-zA-Z0-9], which eliminates the metacharacters needed to break out of the SQL identifier context.

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 7.7 HIGH
CVSS:4.0/AV:N/AC:H/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
vuln.today AI 7.5 HIGH

Network-reachable API but authenticated (PR:L) and second-order/multi-step with privilege dependency justifies AC:H; COPY TO PROGRAM yields full C/I/A within the postgres/container scope (S:U).

3.1 AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
4.0 AV:N/AC:H/AT:P/PR:L/UI:N/VC:H/VI:H/VA:H/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
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
Patch available
Sep 17, 2026 - 23:04 EUVD
CVE Published
Sep 17, 2026 - 22:17 cve.org
HIGH 7.7

DescriptionCVE.org

SQLBot is an intelligent Text-to-SQL system based on large language models and RAG. Prior to 1.9.0, an authenticated user can supply a crafted sheet["tableName"] value in the Excel datasource configuration submitted through POST /api/v1/datasource/, and SQLBot stores that value without safe identifier handling. When the same datasource is later removed through DELETE /api/v1/datasource/{id}, the stored value is interpolated into datasource cleanup SQL and executed by PostgreSQL. This second-order SQL injection can invoke PostgreSQL COPY TO PROGRAM and execute arbitrary operating-system commands with the privileges of the postgres process inside the SQLBot container. This issue is fixed in version 1.9.0.

Technical POC Analysis

CWE-89 (from the CVE metadata; the GHSA text itself lists "No CWEs").

Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.

Executive ViewAI

Why It Matters

SQLBot deployments running versions prior to 1.9.0 are vulnerable to a high-severity SQL injection that can lead to operating system command execution within the SQLBot container. An attacker with a valid account could exploit this flaw to compromise the underlying host, potentially leading to data theft, service disruption, or lateral movement. Given the lack of a vendor patch, immediate mitigating controls are essential to protect sensitive data and maintain operational integrity.

Business Impact: High
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations include restricting API access to trusted networks, enforcing least privilege for database roles (especially revoking COPY TO PROGRAM), monitoring for anomalous datasource creation/deletion, and deploying WAF rules to detect and block malicious payloads in the tableName parameter.

Threat Intelligence Overview

EPSS Score
0.3%
Top 81% exploitable
Prevalence
Low
niche open-source Text-to-SQL/LLM 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 HIGH
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.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
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

38
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +38
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.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

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