/

CVE-2026-32137

Severity:

HIGH RISK

(8.8)

SQL Injection in DataEase previewData Endpoint

CVE-2026-32137

Analyzed

Vulnerability type

Category:

SQL Injection

CWE:

CWE-89

Impact:

Arbitrary SQL Execution / Data Compromise

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

A SQL injection vulnerability in DataEase allows user-supplied table names in the /de2api/datasource/previewData endpoint to be directly concatenated into SQL queries without filtering or parameterization.

Under conditions where an attacker can control the table (or tableName) parameter, they may inject arbitrary SQL, potentially leading to data exfiltration, tampering, or other impactful database operations.

Affected context

This vulnerability occurs in DataEase deployments that expose the /de2api/datasource/previewData API and accept a user-supplied table (or tableName) parameter as part of data preview functionality.

When the application builds SQL queries by concatenating this parameter directly into the query string, an attacker who can invoke this endpoint—through the UI, an API client, or an integrated system—can influence the resulting SQL.

The risk is elevated in environments where the database account used for preview operations has broad read or write permissions.

Exploit preconditions

  • Attack surface: HTTP(S) endpoint /de2api/datasource/previewData
  • Required access: Ability to send requests that control the table / tableName parameter (e.g., authenticated user with data preview rights, or exposed API parameter in a multi-tenant setup)
  • Trigger point: Execution of dynamically constructed SQL queries that embed the unvalidated table name directly into the query string
  • Why exploitation is possible: The application concatenates user-controlled input into SQL without using parameterized queries, quoting/escaping, or allowlisting of table identifiers, enabling crafted input to alter the intended SQL structure

Why this happens

The underlying issue is the construction of SQL statements using string concatenation that directly incorporates user-controlled input.

Instead of treating the table name as a strictly validated identifier, the application embeds the table / tableName parameter into the SQL command text without parameterization, sanitization, or structural constraints.

This maps to CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'), where attackers can inject additional SQL fragments by leveraging metacharacters and control sequences within the input.

Potential impact

  • Attackers may read data from tables they are not intended to access.
  • Attackers may modify or delete data if the database role has write or DDL permissions.
  • Attackers may infer or manipulate schema metadata, such as listing tables or columns.
  • Attackers may chain SQL injection with other weaknesses to escalate privileges or pivot further within the environment.

General mitigation guidance

Effective mitigation centers on eliminating dynamic SQL built from raw user input and enforcing strict control over identifiers:

  • Use parameterized queries or prepared statements wherever possible, avoiding string concatenation for SQL command construction.
  • Treat table names and other identifiers as untrusted; enforce strict allowlists (e.g., only permit known, configured tables) rather than accepting arbitrary identifier strings.
  • Apply robust input validation for any remaining dynamic elements, constraining input to a safe character set and expected patterns (e.g., alphanumeric plus underscore).
  • Run database operations under least-privilege accounts that only have the minimal read/write access required for data preview, limiting impact if injection occurs.
  • Separate query-building logic from request parsing, and centralize safe SQL construction patterns to reduce the chance of ad hoc concatenation.

How teams detect issues like this

Detection can combine code-centric review with runtime monitoring:

  • Static analysis: Configure SAST rules to flag SQL construction via string concatenation, especially where HTTP parameters are used in query-building methods.
  • Code review: Look for patterns where table or tableName parameters flow directly into query strings; verify the use of prepared statements and allowlists for any dynamic identifiers.
  • Security testing: Use automated DAST tools and manual penetration testing to probe the /de2api/datasource/previewData endpoint with injection tests and monitor for abnormal responses or errors.
  • Runtime monitoring: Enable database logging (e.g., query logs, audit trails) to detect anomalous queries with unexpected concatenated fragments or comment markers suggestive of injection attempts.

Sources

SourceLink
github.comgithub.com/dataease/dataease/security/advisories/GHSA-vgm2-269h-8624

Frequently asked

questions

Yes, if the /de2api/datasource/previewData endpoint is accessible over the network and an attacker can control the table / tableName parameter, the injection can be triggered remotely via HTTP(S) requests.

Typically, the attacker needs at least the same level of access as any user or integration that can invoke the data preview API and supply a table name. In some deployments this may require authentication; in misconfigured or overly open environments, it may be reachable by unauthenticated users.

Replace all string-concatenated SQL query construction that uses user-controlled table names with parameterized queries and strict table allowlists. Ensure that only known, server-side defined table identifiers are used, and that no raw client-provided identifier is directly embedded into SQL.

Adopt a development standard that forbids dynamic SQL built from unsanitized input, enforce parameterized queries by default, and centralize database access through vetted helper functions or ORM layers. Complement this with static analysis rules and mandatory security review for any code that constructs SQL dynamically.

Find out what's already
exploitable in your codebase.