/

CVE-2026-62238

Severity:

HIGH RISK

(8.8)

SQL Injection (CWE-89) in OpenRemote Export Endpoint

CVE-2026-62238

Analyzed

Vulnerability type

Category:

SQL Injection

CWE:

CWE-89

Impact:

Database Data Exfiltration and Query 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

An authenticated SQL injection vulnerability in OpenRemote's datapoint crosstab export endpoint allows crafted asset display names to be concatenated directly into PostgreSQL queries.

When an attacker can create or rename assets, they can inject arbitrary SQL and receive the results in exported CSV responses, enabling targeted database data exfiltration under authenticated conditions.

An authenticated SQL injection vulnerability in OpenRemote's datapoint crosstab export endpoint allows crafted asset display names to be concatenated directly into PostgreSQL queries.

When an attacker can create or rename assets, they can inject arbitrary SQL and receive the results in exported CSV responses, enabling targeted database data exfiltration under authenticated conditions.

Affected context

This vulnerability occurs in OpenRemote deployments that expose the datapoint crosstab export functionality to authenticated users who can create or rename assets.

It is relevant where asset display names are used to dynamically build PostgreSQL queries without sufficient input validation or proper parameterization.

The risk increases in environments where the export endpoint has access to sensitive tables or views and where exported CSVs are automatically consumed or trusted by other systems.

This vulnerability occurs in OpenRemote deployments that expose the datapoint crosstab export functionality to authenticated users who can create or rename assets.

It is relevant where asset display names are used to dynamically build PostgreSQL queries without sufficient input validation or proper parameterization.

The risk increases in environments where the export endpoint has access to sensitive tables or views and where exported CSVs are automatically consumed or trusted by other systems.

Exploit preconditions

  • Attack surface: HTTP(S) datapoint crosstab export endpoint in the OpenRemote application
  • Required access: Authenticated account with asset creation or rename permissions
  • Trigger point: Submission of asset display names containing SQL syntax that is incorporated into dynamically constructed PostgreSQL queries
  • Why exploitation is possible: The endpoint concatenates user-controlled asset names directly into raw SQL instead of using parameterized queries or strict input validation, allowing the database to execute attacker-supplied fragments and return results via the CSV export.
  • Attack surface: HTTP(S) datapoint crosstab export endpoint in the OpenRemote application
  • Required access: Authenticated account with asset creation or rename permissions
  • Trigger point: Submission of asset display names containing SQL syntax that is incorporated into dynamically constructed PostgreSQL queries
  • Why exploitation is possible: The endpoint concatenates user-controlled asset names directly into raw SQL instead of using parameterized queries or strict input validation, allowing the database to execute attacker-supplied fragments and return results via the CSV export.

Why this happens

The underlying bug class is classic SQL injection as described by CWE-89: Improper Neutralization of Special Elements used in an SQL Command.

Application logic constructs PostgreSQL queries by directly embedding asset display name values into string-based SQL without parameter binding or robust escaping.

This pattern treats user-controllable text as executable query logic rather than data, enabling attackers to alter the structure of the SQL statement, pivot to additional tables, and extract arbitrary records through legitimate query execution.

The underlying bug class is classic SQL injection as described by CWE-89: Improper Neutralization of Special Elements used in an SQL Command.

Application logic constructs PostgreSQL queries by directly embedding asset display name values into string-based SQL without parameter binding or robust escaping.

This pattern treats user-controllable text as executable query logic rather than data, enabling attackers to alter the structure of the SQL statement, pivot to additional tables, and extract arbitrary records through legitimate query execution.

Potential impact

  • Attacker may exfiltrate sensitive data from accessible database tables via CSV exports.
  • Attacker could manipulate query filters to access records they are not authorized to view.
  • Attacker can potentially enumerate database schema, tables, and columns.
  • Attacker may influence application behavior that depends on query results, such as reporting or analytics outputs.
  • In some configurations, attacker could craft queries that degrade performance or cause denial-of-service conditions at the database layer.
  • Attacker may exfiltrate sensitive data from accessible database tables via CSV exports.
  • Attacker could manipulate query filters to access records they are not authorized to view.
  • Attacker can potentially enumerate database schema, tables, and columns.
  • Attacker may influence application behavior that depends on query results, such as reporting or analytics outputs.
  • In some configurations, attacker could craft queries that degrade performance or cause denial-of-service conditions at the database layer.

General mitigation guidance

Mitigation focuses on eliminating direct string concatenation in SQL construction and reducing trust in user-controlled asset metadata.

Common defensive patterns include:

  • Using parameterized queries or ORM abstractions so that asset display names are always treated as data, not query syntax.
  • Applying strict validation and normalization to asset names (e.g., restricting to a safe character set and length).
  • Separating query logic from presentation attributes, avoiding use of display names for structural SQL decisions.
  • Limiting database privileges of the application account to only necessary tables and operations, reducing impact if injection occurs.
  • Implementing defense-in-depth checks at the service layer, such as centralized query builders or stored procedures with fixed structure.

Mitigation focuses on eliminating direct string concatenation in SQL construction and reducing trust in user-controlled asset metadata.

Common defensive patterns include:

  • Using parameterized queries or ORM abstractions so that asset display names are always treated as data, not query syntax.
  • Applying strict validation and normalization to asset names (e.g., restricting to a safe character set and length).
  • Separating query logic from presentation attributes, avoiding use of display names for structural SQL decisions.
  • Limiting database privileges of the application account to only necessary tables and operations, reducing impact if injection occurs.
  • Implementing defense-in-depth checks at the service layer, such as centralized query builders or stored procedures with fixed structure.

How teams detect issues like this

Detection typically combines code-focused and behavior-focused approaches:

  • Static analysis rules that flag dynamic SQL construction involving string concatenation with user-supplied values, particularly in reporting or export endpoints.
  • Code review practices that require use of parameterized queries or ORM APIs and prohibit raw SQL that embeds request parameters or asset metadata.
  • Logging and monitoring of unusual query patterns, such as unexpected UNIONs, comment markers, or tautological WHERE clauses, originating from the export endpoint.
  • Security testing and fuzzing of endpoints with controlled asset names to identify where user input reaches SQL without neutralization.
  • Integrating automated SAST and DAST tools into CI pipelines to surface SQL injection patterns before deployment.

Detection typically combines code-focused and behavior-focused approaches:

  • Static analysis rules that flag dynamic SQL construction involving string concatenation with user-supplied values, particularly in reporting or export endpoints.
  • Code review practices that require use of parameterized queries or ORM APIs and prohibit raw SQL that embeds request parameters or asset metadata.
  • Logging and monitoring of unusual query patterns, such as unexpected UNIONs, comment markers, or tautological WHERE clauses, originating from the export endpoint.
  • Security testing and fuzzing of endpoints with controlled asset names to identify where user input reaches SQL without neutralization.
  • Integrating automated SAST and DAST tools into CI pipelines to surface SQL injection patterns before deployment.

Sources

SourceLink
github.comgithub.com/openremote/openremote/security/advisories/GHSA-cgfv-jrfp-2r7v
vulncheck.comvulncheck.com/advisories/openremote-sql-injection-via-crosstab-export

Frequently asked

questions

It is exploitable wherever the OpenRemote datapoint crosstab export endpoint is reachable. In many deployments this is over HTTPS from internal networks, but if the management interface is exposed externally, an attacker with valid credentials could exploit it remotely.

The attacker must be an authenticated user with permissions to create or rename assets. They then use crafted asset display names to inject SQL into the export queries.

Replace string-based SQL concatenation with parameterized queries or ORM mechanisms, and ensure that asset display names are treated strictly as data. Combined with input validation and least-privilege database accounts, this removes the injection vector and limits damage.

Establish secure coding standards that mandate parameterized queries, enforce input validation on all user-controllable fields, and require security-focused code reviews for any data-access logic. Augment this with automated static analysis and regular application security testing to catch unsafe query construction early in the lifecycle.

It is exploitable wherever the OpenRemote datapoint crosstab export endpoint is reachable. In many deployments this is over HTTPS from internal networks, but if the management interface is exposed externally, an attacker with valid credentials could exploit it remotely.

The attacker must be an authenticated user with permissions to create or rename assets. They then use crafted asset display names to inject SQL into the export queries.

Replace string-based SQL concatenation with parameterized queries or ORM mechanisms, and ensure that asset display names are treated strictly as data. Combined with input validation and least-privilege database accounts, this removes the injection vector and limits damage.

Establish secure coding standards that mandate parameterized queries, enforce input validation on all user-controllable fields, and require security-focused code reviews for any data-access logic. Augment this with automated static analysis and regular application security testing to catch unsafe query construction early in the lifecycle.

Find out what's already
exploitable in your codebase.