/

CVE-2026-33083

Severity:

HIGH RISK

(8.8)

SQL Injection in DataEase Dataset Endpoints

CVE-2026-33083

Analyzed

Vulnerability type

Category:

SQL Injection

CWE:

CWE-89

Impact:

Authenticated SQL Injection leading to data exfiltration and denial of service

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 dataset-related APIs where the orderDirection parameter is inserted directly into an ORDER BY clause.

An authenticated attacker can abuse the sorting direction field to inject arbitrary SQL, enabling time-based blind data extraction and denial of service when dataset queries are executed.

Affected context

The vulnerability occurs in DataEase's dataset-related HTTP endpoints, notably /de2api/datasetData/enumValueDs and /de2api/datasetTree/exportDataset, when they construct SQL queries to retrieve or export data.

It manifests when the backend Order2SQLObj class takes the user-supplied orderDirection parameter and passes it into the SQL ORDER BY clause without validation or whitelisting.

This issue is relevant where these APIs are exposed to authenticated users, and the underlying database engine executes dynamically built SQL constructed from request parameters.

Exploit preconditions

  • Attack surface: Dataset-related HTTP API endpoints, including /de2api/datasetData/enumValueDs and /de2api/datasetTree/exportDataset.
  • Required access: Valid, authenticated access to DataEase with permission to trigger dataset queries that accept the orderDirection parameter.
  • Trigger point: Submission of crafted orderDirection values that are incorporated into the ORDER BY clause and executed by the database.
  • Why exploitation is possible: The Order2SQLObj class concatenates unvalidated, user-controlled orderDirection directly into an SQL template rendered by StringTemplate, bypassing parameterization and allowing arbitrary SQL fragments to influence query execution.

Why this happens

The underlying flaw is a classic SQL Injection (CWE-89) issue caused by dynamic query construction using untrusted input.

Instead of treating orderDirection as data, the implementation interpolates it into the SQL ORDER BY clause as executable syntax, without enforcing a strict whitelist (e.g., only ASC or DESC) or using parameterized expressions.

This design couples user-controlled strings with query structure, allowing an attacker to alter the semantics of the query and execute additional SQL logic through time-based blind techniques or other injection patterns.

Potential impact

  • An attacker may perform time-based blind SQL queries to infer and exfiltrate sensitive data stored in the database.
  • The application could be forced into expensive or blocking SQL operations, leading to partial or full denial of service for dataset-related functionality.
  • Depending on database configuration and permissions, an attacker might modify or delete data, impacting integrity and availability.
  • Logging and monitoring systems that rely on database queries can be disrupted or polluted through injected statements.

General mitigation guidance

Effective mitigation focuses on treating sort parameters as controlled values rather than executable query fragments.

Pattern-based defenses include:

  • Restricting orderDirection to a strict server-side whitelist (for example, mapping only known tokens like ASC and DESC from a fixed enumeration).
  • Avoiding direct string concatenation in SQL builders, even for seemingly harmless fields like column names or sort directions; instead, use query builder APIs or conditional branching to construct ORDER BY clauses.
  • Centralizing query construction logic so that all dynamic SQL paths apply consistent validation and encoding rules to user input.
  • Applying the principle of least privilege at the database layer so injected statements are constrained by limited permissions.
  • Designing APIs so that clients cannot influence raw SQL syntax; instead, expose higher-level parameters that are resolved to safe server-side primitives.

How teams detect issues like this

Detection efforts can combine code-centric and behavior-centric approaches:

  • Static analysis: Configure rules to flag dynamic SQL construction involving request parameters, particularly when values flow into ORDER BY, WHERE, or other structural clauses without parameterization or whitelisting.
  • Code review: During manual reviews, examine utility classes like Order2SQLObj and shared query builders, looking for string concatenation using HTTP parameters or request DTO fields.
  • Unit and integration tests: Add security-focused tests that send unexpected or malformed orderDirection values and verify that the application returns validation errors instead of propagating them to the database.
  • Runtime monitoring: Use database query logging and anomaly detection to spot queries containing user input in structural locations (e.g., unusual ORDER BY fragments or timing patterns indicating time-based blind probing).
  • Policy enforcement: Integrate automated tools into CI/CD pipelines to enforce rules against raw SQL concatenation and require the use of approved query-building patterns.

Sources

SourceLink
github.comgithub.com/dataease/dataease/releases/tag/v2.10.21
github.comgithub.com/dataease/dataease/security/advisories/GHSA-f443-95cf-m837

Frequently asked

questions

Exploitation is limited to authenticated users who can invoke the affected dataset endpoints and control the orderDirection parameter. Within that scope, an attacker can reliably influence the SQL executed for those queries, making the issue serious in multi-tenant or shared environments.

Typically, the attacker only needs sufficient privileges to access and query datasets through the vulnerable APIs. Elevated administrative rights are not required if the dataset endpoints are available to standard authenticated users.

The defensible pattern is to decouple user input from query structure entirely: restrict orderDirection to a predefined set of allowed values (such as an enum) and construct ORDER BY clauses using explicit server-side logic or query builder abstractions instead of direct string interpolation.

Adopt a secure-by-default query construction approach across the codebase, using parameterized queries or ORM/query builders, applying strict validation and whitelisting for any user-controlled value that influences query structure, and enforcing these patterns via coding standards, code reviews, and automated static analysis in the development pipeline.

Find out what's already
exploitable in your codebase.