Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-32950: CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') in dataease SQLBot

0
High
VulnerabilityCVE-2026-32950cvecve-2026-32950cwe-89cwe-78
Published: Fri Mar 20 2026 (03/20/2026, 04:14:45 UTC)
Source: CVE Database V5
Vendor/Project: dataease
Product: SQLBot

Description

SQLBot is an intelligent data query system based on a large language model and RAG. Versions prior to 1.7.0 contain a critical SQL Injection vulnerability in the /api/v1/datasource/uploadExcel endpoint that enables Remote Code Execution (RCE), allowing any authenticated user (even the lowest-privileged) to fully compromise the backend server. The root cause is twofold: Excel Sheet names are concatenated directly into PostgreSQL table names without sanitization (datasource.py#L351), and those table names are embedded into COPY SQL statements via f-strings instead of parameterized queries (datasource.py#L385-L388). An attacker can bypass the 31-character Sheet name limit using a two-stage technique—first uploading a normal file whose data rows contain shell commands, then uploading an XML-tampered file whose Sheet name injects a TO PROGRAM 'sh' clause into the SQL. Confirmed impacts include arbitrary command execution as the postgres user (uid=999), sensitive file exfiltration (e.g., /etc/passwd, /etc/shadow), and complete PostgreSQL database takeover. This issue has been fixed in version 1.7.0.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 03/27/2026, 19:07:59 UTC

Technical Analysis

SQLBot, an intelligent data query system leveraging large language models and retrieval-augmented generation (RAG), suffers from a critical SQL Injection vulnerability (CVE-2026-32950) in versions before 1.7.0. The vulnerability exists in the /api/v1/datasource/uploadExcel endpoint where Excel sheet names are directly concatenated into PostgreSQL table names without any sanitization (in datasource.py at line 351). These table names are then embedded into COPY SQL commands using Python f-strings (lines 385-388), which do not provide protection against injection. The sheet name length is limited to 31 characters, but attackers can circumvent this by first uploading a normal Excel file containing data rows with shell commands, then uploading a second XML-tampered file with a crafted sheet name that injects a TO PROGRAM 'sh' clause into the SQL COPY statement. This results in Remote Code Execution as the postgres user (uid=999), enabling attackers to execute arbitrary shell commands, exfiltrate sensitive files such as /etc/passwd and /etc/shadow, and fully compromise the PostgreSQL database. The vulnerability requires authentication but no additional user interaction. The flaw stems from improper neutralization of special elements in SQL commands (CWE-89) and improper neutralization of special elements used in OS commands (CWE-78). The vulnerability is rated high severity with a CVSS 4.0 score of 8.6 and has been patched in SQLBot version 1.7.0.

Potential Impact

The impact of CVE-2026-32950 is severe for organizations using vulnerable versions of SQLBot. An attacker with any authenticated access can achieve Remote Code Execution on the backend server as the postgres user, which typically has extensive privileges over the database and potentially the host system. This can lead to complete database compromise, unauthorized data access, data exfiltration including sensitive system files, and potential lateral movement within the network. The ability to execute arbitrary shell commands elevates the risk to full system takeover, data destruction, or deployment of ransomware or other malware. Organizations relying on SQLBot for data querying and integration face significant risks to confidentiality, integrity, and availability of their data and systems. The vulnerability's exploitation does not require user interaction beyond authentication, increasing the likelihood of successful attacks if credentials are compromised or weakly protected.

Mitigation Recommendations

To mitigate this vulnerability, organizations should immediately upgrade SQLBot to version 1.7.0 or later where the issue is fixed. Until upgrade is possible, restrict access to the /api/v1/datasource/uploadExcel endpoint to trusted users only and enforce strong authentication and authorization controls to limit who can upload Excel files. Implement network segmentation and monitoring to detect unusual database or shell command activity. Review and sanitize all user-supplied inputs, especially Excel sheet names, ensuring they are validated against a strict whitelist of allowed characters and lengths before use in SQL statements. Avoid using string concatenation or f-strings for SQL commands; instead, use parameterized queries or prepared statements. Employ database roles with least privilege, ensuring the postgres user or equivalent does not have unnecessary OS-level permissions. Conduct regular audits of database logs and system activity to detect potential exploitation attempts. Finally, educate developers on secure coding practices to prevent similar injection flaws.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-03-17T00:05:53.284Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 69bcd2fce32a4fbe5f2df420

Added to database: 3/20/2026, 4:54:20 AM

Last enriched: 3/27/2026, 7:07:59 PM

Last updated: 4/30/2026, 3:18:03 PM

Views: 75

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses