Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconAuthenticate to SQLBot as low-privilege user
-
DeliveryPOST malicious sheet["tableName"] to /api/v1/datasource/
-
ExploitPayload stored without identifier sanitization
-
InstallDELETE /api/v1/datasource/{id} triggers cleanup SQL
-
C2Second-order SQLi executes in PostgreSQL
-
ExecuteCOPY TO PROGRAM runs OS commands as postgres
-
ImpactContainer 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. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – 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
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
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
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
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).
Primary rating from Vendor (github).
CVSS VectorVendor: github
Lifecycle Timeline
2DescriptionCVE.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.
Articles & Coverage 1
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
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.
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
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.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
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-82564
NVD
CVE.org
EPSS
Vulnrichment
GitHub
Exploit-DB