/

CVE-2026-33122

Severity:

CRITICAL RISK

(9.8)

SQL Injection in DataEase Datasource Update API

CVE-2026-33122

Analyzed

Vulnerability type

Category:

SQL Injection

CWE:

CWE-89

Impact:

Arbitrary SQL Execution and Data Exposure

Severity:

CRITICAL RISK

(9.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A SQL injection vulnerability in DataEase allows crafted table names submitted via the /de2api/datasource/update endpoint to be injected into a CREATE TABLE statement without sanitization or proper identifier escaping.

An authenticated attacker who can update datasources may execute arbitrary SQL, enabling database information disclosure and potentially broader compromise of the underlying database.

Affected context

The issue occurs in DataEase deployments that expose the /de2api/datasource/update API and allow authenticated users to modify or create datasource configurations.

During the datasource update flow, a user-provided deTableName is passed into DatasourceSyncManage.createEngineTable and interpolated directly into a CREATE TABLE SQL template.

In environments where database accounts used by DataEase have broad privileges, exploitation risk increases because injected SQL can affect more than the intended schema.

Exploit preconditions

  • Attack surface: HTTP API endpoint /de2api/datasource/update
  • Required access: Valid authenticated user with permissions to update datasource configurations
  • Trigger point: Submission of a crafted datasource update payload where the deTableName parameter contains SQL meta-characters and injected statements
  • Why exploitation is possible: The deTableName value is concatenated into a CREATE TABLE statement without parameterization, validation, or safe identifier quoting, allowing the attacker to break out of the intended identifier context and append arbitrary SQL.

Why this happens

This vulnerability is a classic instance of CWE-89: SQL Injection, where untrusted input is incorporated directly into SQL statements.

Instead of treating deTableName as an opaque identifier and safely quoting or parameterizing it, the implementation builds a dynamic CREATE TABLE statement via string concatenation.

Because no canonicalization, whitelist validation, or database-specific identifier escaping is applied, an attacker can inject SQL control characters (such as quote characters, delimiters, or statement terminators) into deTableName, causing the database to interpret part of the user input as executable SQL rather than as data.

Potential impact

  • Extraction of database metadata such as table names, column types, and schema details
  • Reading of sensitive business data from accessible tables via injected queries
  • Modification or deletion of data within the privileges of the application's database account
  • Creation or alteration of tables and other schema objects
  • Potential pivot to broader database compromise if high-privilege accounts are used

General mitigation guidance

Effective mitigation centers on eliminating direct string concatenation for SQL construction and reducing trust in client-provided identifiers.

Recommended defensive patterns include:

  • Using parameterized queries or prepared statements for all SQL components where supported, including identifiers when the database/driver permits.
  • Applying strict server-side validation to identifiers such as table names (e.g., limiting to an approved character set, length, and format and rejecting any value that does not match a whitelist-style pattern).
  • Employing database-specific safe identifier quoting utilities, rather than manual string concatenation, when dynamic identifiers are unavoidable.
  • Segregating database privileges so that the application account used for datasource management has only the minimal schema and data permissions required.
  • Centralizing SQL construction through well-reviewed helper functions or ORM layers, discouraging ad-hoc statement templates scattered across the codebase.

How teams detect issues like this

Organizations can look for similar issues using a combination of automated and manual techniques:

  • Static analysis: Configure rules that flag raw SQL string concatenation using user-controlled variables (e.g., deTableName) and inspect areas where identifiers or clauses are built from request parameters.
  • Code review: During manual reviews, pay particular attention to API handlers for configuration or administrative endpoints and verify that all SQL is built via safe patterns (parameterization, validated identifiers, or ORM).
  • Security testing: Use targeted input fuzzing and application security testing to submit specially crafted identifier values containing quotes, delimiters, and comment markers, observing for SQL errors or anomalous responses.
  • Database monitoring: Enable query logging or use database activity monitoring tools to detect unexpected multi-statement executions, suspicious CREATE TABLE or DDL operations, and patterns indicative of injection attempts.

Sources

SourceLink
github.comgithub.com/dataease/dataease/releases/tag/v2.10.21
github.comgithub.com/dataease/dataease/security/advisories/GHSA-28vg-3hv7-w92f

Frequently asked

questions

Exploitation requires authenticated access to the datasource update API. Within environments where many users can manage datasources or where API tokens are widely distributed, the practical exposure can be significant.

The attacker needs sufficient privileges to call /de2api/datasource/update and submit datasource configurations. No direct database-level access is required; the attack is performed through the application using its database credentials.

Replace any string-concatenated SQL with parameterized statements or carefully vetted helper functions that enforce strict validation and safe quoting of identifiers. Centralize SQL construction logic so that it can be consistently secured and tested.

Adopt a development policy that forbids raw SQL concatenation with user input, require parameterization by default, implement rigorous server-side validation for all dynamic identifiers, and incorporate automated checks (static analysis and CI security gates) to catch unsafe SQL patterns before code is merged.

Find out what's already
exploitable in your codebase.