/

CVE-2026-33082

Severity:

CRITICAL RISK

(9.8)

SQL Injection in DataEase Dataset Export Expression Filters

CVE-2026-33082

Analyzed

Vulnerability type

Category:

SQL Injection

CWE:

CWE-89

Impact:

Arbitrary SQL Execution and Data Exfiltration

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

DataEase versions 2.10.20 and below contain a SQL injection vulnerability in the dataset export API, where user-supplied filter expressions are translated into SQL without proper sanitization.

By crafting malicious values in the expressionTree parameter, an attacker can inject arbitrary SQL into export queries, potentially extracting or manipulating database data through blind SQL injection techniques.

Affected context

The vulnerability occurs in DataEase's dataset export functionality, specifically the POST /de2api/datasetTree/exportDataset endpoint.

Incoming expressionTree data is deserialized into a filter object and converted into SQL via WhereTree2Str.transFilterTrees, where like filter values are concatenated directly into query fragments.

This affects deployments where the export API is reachable (e.g., internal dashboards, shared analytics environments) and where user-controlled filter expressions are allowed to influence dataset exports without strict validation.

Exploit preconditions

  • Attack surface: HTTP POST requests to /de2api/datasetTree/exportDataset.
  • Required access: Ability to invoke the export API with a controllable expressionTree parameter (e.g., authenticated dashboard user, compromised account, or exposed endpoint).
  • Trigger point: Submission of a crafted filter expression whose like term contains SQL meta-characters that break out of the intended string literal.
  • Why exploitation is possible: User-controlled filter values are directly concatenated into SQL fragments in WhereTree2Str.transFilterTrees without parameterization or proper escaping, allowing the attacker to alter the structure of the resulting SQL query and perform blind SQL injection.

Why this happens

This issue is a classic example of CWE-89: Improper Neutralization of Special Elements used in an SQL Command (SQL Injection).

The application takes a structured filter object derived from expressionTree and builds SQL manually, concatenating like clause values directly into the query string.

Because these values are not passed through parameterized queries or robust escaping routines, the database interprets parts of the filter as executable SQL rather than data.

The bug is architectural: the SQL generation logic couples user-controlled input with raw query fragments instead of using a safe query-building abstraction or ORM parameter binding.

Potential impact

  • Extraction of sensitive data from application tables via blind SQL injection (e.g., time-based inference).
  • Enumeration of database schema, including table and column names.
  • Possible modification or deletion of data, depending on the database user's privileges.
  • Abuse of database-level functions to perform further reconnaissance within the database environment.
  • Pivoting into other application functionality that relies on the same database account and permissions.

General mitigation guidance

Effective mitigation focuses on eliminating raw string concatenation in SQL construction and reducing trust in user-supplied filter expressions.

Recommended patterns include:

  • Refactoring SQL generation to use parameterized queries or prepared statements for all user-controlled values, including LIKE patterns.
  • Introducing a safe query-building layer (ORM, query builder, or strict DSL) that never directly concatenates filters into SQL.
  • Validating and normalizing filter structures and operators in expressionTree against an allowlist of supported operations and types before translation.
  • Limiting permissible characters and length in filter values where possible, especially for text-based search and LIKE clauses.
  • Applying least-privilege to the database account used by DataEase, restricting it to only the necessary schemas and operations required for reporting.
  • Centralizing SQL construction logic so security controls (parameterization, validation) are consistently applied rather than implemented ad hoc.

How teams detect issues like this

Detection typically combines code-level analysis with runtime monitoring.

Code and design inspection:

  • Search for manual SQL string building in the codebase (e.g., concatenation in WhereTree2Str.transFilterTrees and similar utilities).
  • Flag any use of user input (or deserialized objects like expressionTree) that are inserted into SQL without parameters.
  • Use static analysis rules focused on CWE-89 that detect concatenation of request parameters, JSON fields, or expression trees into SQL strings.
  • Review API endpoints that accept complex filter/ordering JSON and translate them into SQL to ensure these rely on parameterized query builders.

Runtime and operational monitoring:

  • Enable database query logging and review for anomalous patterns, such as unexpected use of sleep, benchmark, or heavy conditional expressions typical of time-based attacks.
  • Implement Web Application Firewall (WAF) rules tuned for SQL injection signatures on dataset export and filter-related endpoints.
  • Correlate slow or delayed responses on export endpoints with suspicious query patterns to surface potential blind SQL injection attempts.

Sources

SourceLink
github.comgithub.com/dataease/dataease/releases/tag/v2.10.21
github.comgithub.com/dataease/dataease/security/advisories/GHSA-xxpw-2c8q-g693

Frequently asked

questions

Exploitability depends on who can reach the POST /de2api/datasetTree/exportDataset endpoint and control expressionTree. In many deployments, authenticated users or integrations can access it, which is enough for a determined attacker to perform blind SQL injection if they can craft filter expressions.

Not necessarily. Any role that can trigger dataset exports and supply or influence the expressionTree parameter could be sufficient. The impact then depends on the database privileges of the application's connection account, not the user's UI role.

Replace all concatenation-based query construction paths with parameterized queries or a safe query-building abstraction, ensuring every user-controlled value—especially LIKE patterns—is bound as a parameter. Additionally, validate the structure and operators of incoming filter trees against strict allowlists before converting them to SQL.

Adopt a "no raw SQL concatenation" policy, enforce it through code review and static analysis, and standardize on vetted query-building utilities or ORMs. Treat structured filter inputs (JSON expression trees, query builders) as untrusted, normalizing and validating them, and ensure that security checks are incorporated into CI/CD pipelines to detect SQL injection patterns early.

Find out what's already
exploitable in your codebase.