/

CVE-2026-28443

Severity:

CRITICAL RISK

(9.8)

SQL Injection in OpenReplay cards search endpoint

CVE-2026-28443

Analyzed

Vulnerability type

Category:

SQL Injection

CWE:

CWE-89

Impact:

Arbitrary SQL Query Execution and Data Compromise

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

A critical SQL injection vulnerability in OpenReplay's POST /{projectId}/cards/search endpoint allows untrusted input from the sort.field parameter to be interpolated into SQL queries.

If an attacker can send crafted requests to this endpoint, they may execute arbitrary SQL commands against the backend database, leading to data exfiltration, modification, or destruction.

Affected context

This vulnerability appears in OpenReplay deployments that expose the POST /{projectId}/cards/search API and use the sort.field request parameter to dynamically influence database query ordering.

The risk is present when:

  • User-controlled values for sort.field are incorporated into SQL without strict validation or parameterization, and
  • The application runs with a database account that has broad read/write privileges on application tables.

Any internet- or network-accessible instance of this endpoint is potentially affected, depending on access controls and API authentication.

Exploit preconditions

  • Attack surface: HTTP API endpoint POST /{projectId}/cards/search.
  • Required access: Ability to issue requests to the OpenReplay backend (through the UI, API client, or intercepted traffic). Authentication requirements depend on deployment configuration.
  • Trigger point: Supplying a specially crafted sort.field value that is propagated into the SQL query for card search or sorting.
  • Why exploitation is possible: The application treats sort.field as trusted and concatenates it or otherwise embeds it into an SQL statement without robust parameterization or strict whitelisting, enabling the attacker to alter query structure.

Why this happens

The underlying flaw is a classic CWE-89: SQL Injection issue.

The server-side handler for POST /{projectId}/cards/search uses the sort.field parameter to influence the ORDER BY or similar clause of a SQL query but fails to strictly constrain the allowed values or use a safe, parameterized mechanism for column selection.

Instead of mapping sort.field to a fixed set of known-safe column identifiers, the implementation effectively blends user input into the query text, allowing adversaries to inject additional SQL tokens.

This insecure pattern arises whenever application logic dynamically constructs SQL from user-controlled strings rather than separating code from data.

Potential impact

  • Extraction of sensitive information from OpenReplay's database, including session metadata and potentially user-related data.
  • Unauthorized modification or deletion of stored records, impacting data integrity and auditability.
  • Creation or alteration of application-level accounts or configuration data stored in the database.
  • Escalation to broader system compromise if the database account has powerful privileges or if SQL features allow execution of server-side functions.
  • Denial of service through destructive queries (e.g., dropping tables or locking resources).

General mitigation guidance

Effective mitigation for this class of issue centers on removing direct string interpolation in SQL and constraining dynamic query parts:

  • Use parameterized queries or prepared statements for all variable data; never build SQL by concatenating request parameters.
  • For dynamic sorting, map the sort.field value to a predefined whitelist of column names, rejecting any value outside this set.
  • Encapsulate query construction in a data-access layer or ORM that exposes safe APIs for ordering, filtering, and pagination instead of raw SQL string handling.
  • Enforce least privilege for the database account used by the application, limiting its ability to perform schema changes or access unrelated tables.
  • Apply centralized input validation and normalization, particularly on parameters used for search, filtering, or sorting, to ensure they match expected formats and enumerations.

How teams detect issues like this

Organizations can identify and monitor this type of vulnerability through a combination of preventive and detective controls:

  • Static analysis: Configure SAST rules to flag raw SQL construction, string concatenation in query builders, and direct use of request parameters in query strings.
  • Code review: During manual reviews, scrutinize endpoints that support dynamic filtering or sorting, verifying that they use whitelists and parameterized access patterns for column names.
  • Dynamic testing: Use automated scanners or custom test harnesses that inject SQL metacharacters into parameters like sort.field to observe unexpected behavior or error messages.
  • Database monitoring: Enable query logging and anomaly detection to highlight unusual or syntactically suspicious SQL statements, particularly those containing repeated patterns of common injection payload fragments.

Sources

SourceLink
github.comgithub.com/openreplay/openreplay/security/advisories/GHSA-q6gf-3qg3-pww5

Frequently asked

questions

Yes. If the POST /{projectId}/cards/search endpoint is reachable over the network and the attacker can send requests to it, the SQL injection can typically be exploited remotely, subject to any authentication or access controls in front of the API.

That depends on how OpenReplay is deployed. In some environments, this endpoint may be available only to authenticated users, while in others, broader access may exist. Regardless, any user or system that can control the sort.field parameter and reach the backend can potentially attempt exploitation.

The most robust fix is to eliminate direct string concatenation for SQL and to strictly whitelist allowable sort fields. Application code should translate a small, enumerated set of client-visible sort keys into hard-coded column identifiers and pass all other user data through parameterized queries.

Adopt a standard database access layer that enforces parameterization by default, institute coding guidelines that forbid raw query string construction with user input, and integrate static and dynamic security testing into the CI/CD pipeline. Regular security-focused code reviews of API endpoints that support searching, filtering, and sorting further reduce the likelihood of introducing similar flaws.

Find out what's already
exploitable in your codebase.