/

CVE-2026-33084

Severity:

HIGH RISK

(8.8)

SQL Injection in DataEase enumValueObj Endpoint

CVE-2026-33084

Analyzed

Vulnerability type

Category:

SQL Injection

CWE:

CWE-89

Impact:

Arbitrary SQL Execution and Data Exposure/Manipulation

Severity:

HIGH RISK

(8.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 sort parameter of the /de2api/datasetData/enumValueObj API endpoint.

Because user-controlled sort values are interpolated directly into an ORDER BY clause without proper validation, an authenticated attacker can perform time-based blind SQL injection and execute arbitrary SQL within the underlying database.

Affected context

This vulnerability affects deployments of DataEase that expose the /de2api/datasetData/enumValueObj endpoint and allow authenticated users to supply arbitrary sort parameters when querying datasets.

The risk is present when the DatasetDataManage service layer passes user-provided sort values into query construction logic without enforcing a strict whitelist of sortable fields or using a parameterized abstraction for ORDER BY clauses.

Typical scenarios include dashboards, reports, or dataset exploration interfaces where users can change sorting behavior dynamically.

Exploit preconditions

  • Attack surface: HTTP(S) interface for the /de2api/datasetData/enumValueObj endpoint.
  • Required access: Valid authenticated user account with permission to invoke the endpoint and control the sort parameter.
  • Trigger point: Submission of crafted requests where the sort parameter contains injected SQL fragments.
  • Why exploitation is possible: The sort value is propagated from the DatasetDataManage service to sorting metadata, then into Order2SQLObj, and finally into the SQL ORDER BY clause without whitelist validation or safe construction.

The resulting SQL is executed by CalciteProvider, allowing attacker-controlled content to influence query structure and timing (time-based blind behavior).

Why this happens

The core issue is unvalidated and unsafely constructed dynamic SQL, aligning with CWE-89: SQL Injection.

Instead of treating the sort parameter as an abstract field identifier mapped to a predefined column list, the implementation directly concatenates or interpolates the user-supplied value into the ORDER BY clause.

ORDER BY segments are not parameterized in the same way as data values, so application code must enforce strict whitelisting of allowed column names and sort directions.

By failing to normalize and validate the sort parameter before building the query, the system allows attacker-controlled input to modify the structure of the SQL statement itself.

Potential impact

  • Extraction of sensitive data that the authenticated account can indirectly reach.
  • Modification of query logic to infer data using time-based blind SQL injection.
  • Potential alteration or deletion of data if the underlying database permissions allow it.
  • Discovery of schema details, including table and column names, through crafted injection probes.
  • Lateral movement to other queries or stored procedures invoked by the same database connection, depending on database configuration.

General mitigation guidance

Effective mitigation for this class of vulnerability centers on strict input control for query structure and safe query construction patterns:

  • Treat ORDER BY components (column names, directions) as identifiers, not free-form text, and map user choices to a fixed, hard-coded list of permitted fields and sort directions.
  • Use higher-level query builders or ORM abstractions that separate query structure from user input, making it difficult to directly concatenate raw strings into SQL.
  • Normalize and validate all sorting inputs (e.g., enforcing a known set of column keys, rejecting unexpected tokens, and disallowing multiple expressions or functions).
  • Apply defense-in-depth on the database layer with least-privilege accounts that only have the minimal required permissions for read and write operations.
  • Implement centralized validation utilities for query parameters (filters, sorts, pagination) to avoid duplicating risky string handling logic across services.

How teams detect issues like this

Detection involves both code-level and runtime approaches:

  • Static analysis: Configure rules to flag string concatenation or unparameterized interpolation of request parameters (such as sort, order, column) into SQL-building logic, including ORDER BY clauses.
  • Code review: Examine service layers that translate user-requested sorting into SQL or DSL constructs; ensure they only use whitelisted field mappings and never accept raw SQL fragments.
  • Unit and integration tests: Include negative tests that send deliberately malformed sort values to verify that they are rejected or sanitized rather than executed.
  • Runtime monitoring: Enable database and application logs to capture slow queries and unusual patterns typical of time-based blind injection (e.g., repeated requests with small variations in sort values causing consistent timing anomalies).
  • Automated scanning: Use API-focused security testing tools or fuzzers to probe sort/order parameters and detect behavior consistent with SQL injection, particularly timing-based techniques.

Sources

SourceLink
github.comgithub.com/dataease/dataease/releases/tag/v2.10.21
github.comgithub.com/dataease/dataease/security/advisories/GHSA-r897-r9q8-3p2x

Frequently asked

questions

Yes, as long as the DataEase HTTP(S) API is reachable and the attacker has valid credentials, they can send crafted requests to the vulnerable endpoint from a remote location.

The attacker needs an authenticated account that can access the /de2api/datasetData/enumValueObj endpoint and control the sort parameter.

The ultimate impact is constrained by both the application's authorization logic and the database privileges assigned to the application's database user.

The most robust fix is to remove any direct use of raw sort values in SQL and instead map user-facing sort options to a tightly controlled set of column identifiers and sort directions, constructed using safe query-building APIs.

In other words, query structure (including ORDER BY) should be derived only from trusted, predefined metadata rather than free-form user input.

Adopt a standard pattern for building queries that enforces parameterization for data values and strict whitelisting for structural elements like columns, tables, and ORDER BY clauses.

Combine this with secure coding guidelines, static analysis rules that flag dynamic SQL construction, and security-focused code reviews for any area that translates request parameters into database queries.

Find out what's already
exploitable in your codebase.