/

CVE-2026-93426

Severity:

HIGH RISK

(8.5)

SQL Injection (CWE-89) in SigNoz v5 Query Range API

CVE-2026-93426

Awaiting Analysis

Vulnerability type

Category:

SQL Injection

CWE:

CWE-89

Impact:

Unauthorized database access and data exfiltration

Severity:

HIGH RISK

(8.5)

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

SigNoz fails to escape user-supplied telemetry field-key names in the v5 query_range API, allowing authenticated users to inject ClickHouse SQL. A Viewer-role user or higher may exploit crafted field names to access system tables and exfiltrate telemetry or other database data.

Affected context

The vulnerability occurs in SigNoz deployments that expose the v5 query_range API and process user-controlled telemetry field-key names as part of ClickHouse queries. It becomes risky when an authenticated user with Viewer privileges or higher can submit field names containing characters that are interpreted as SQL identifier or string delimiters, and the API does not apply context-appropriate escaping or parameterization.

Exploit preconditions

  • Attack surface: The v5 query_range API
  • Required access: An authenticated SigNoz account with Viewer role or higher
  • Trigger point: Query construction involving user-supplied telemetry field-key names
  • Why exploitation is possible: Field names are insufficiently escaped before being incorporated into ClickHouse SQL, allowing identifier or string-literal boundaries to be altered

Why this happens

The underlying bug is SQL query construction that treats user-controlled field-key names as trusted SQL syntax. Special characters such as backticks and quotes can change the interpretation of identifiers or string literals when values are concatenated into a query without context-aware escaping or parameterization. This maps to CWE-89: Improper Neutralization of Special Elements used in an SQL Command, commonly known as SQL injection.

Potential impact

  • An attacker may execute arbitrary ClickHouse SQL within the API's database context.
  • An attacker could read system tables and internal metadata.
  • Sensitive telemetry and stored data may be exfiltrated.
  • Query integrity could be affected, potentially exposing information across tenants or datasets depending on deployment controls.
  • Database resources could be abused through unauthorized queries.

General mitigation guidance

Mitigation generally focuses on ensuring that user-controlled field names cannot become executable SQL syntax.

Common defensive patterns include:

  • Using parameterized query mechanisms wherever supported.
  • Applying strict allowlists for valid field-key names and rejecting unexpected delimiters.
  • Escaping identifiers with database-specific, context-appropriate routines rather than generic string replacement.
  • Separating query structure from user-provided values and identifiers.
  • Enforcing tenant isolation and least-privilege permissions for the API's ClickHouse account.
  • Limiting access to system tables and sensitive datasets through database policies.
  • Applying authentication, authorization, and rate-limiting controls consistently across query endpoints.

How teams detect issues like this

Organizations can look for this vulnerability through:

  • Static analysis rules identifying string concatenation or interpolation of request fields into SQL statements.
  • Code review checks for field names used as identifiers without database-specific escaping or allowlisting.
  • Dynamic testing with delimiter characters in telemetry field-key inputs, using non-destructive validation cases.
  • API gateway or database audit logs showing unusual query structures, system-table access, or unexpected identifier patterns.
  • Policy enforcement that requires parameterized queries and restricts database identities used by read-only APIs.

Automated security review tools may help identify unsafe query construction patterns, but database-aware manual review remains useful for identifier handling.

Sources

SourceLink
github.comgithub.com/SigNoz/signoz
github.comgithub.com/SigNoz/signoz/blob/v0.141.1/pkg/apiserver/signozapiserver/querier.go#L26
github.comgithub.com/SigNoz/signoz/blob/v0.141.1/pkg/querybuilder/fallback_expr.go#L16-L22
github.comgithub.com/SigNoz/signoz/blob/v0.141.1/pkg/telemetrymetadata/field_mapper.go#L79-L87
github.comgithub.com/SigNoz/signoz/commit/8e00c0405697659bd4994a5de446cf3028c0f76d
github.comgithub.com/SigNoz/signoz/commit/9c886be12015c43a1465af3532b3c3afbec6bebc
github.comgithub.com/SigNoz/signoz/releases/tag/v0.142.0
github.comgithub.com/SigNoz/signoz/security/advisories/GHSA-q3h7-gpc9-2rxc
vulncheck.comvulncheck.com/advisories/signoz-0.87.0-before-0.142.0-sql-injection-in-v5-query-builder-field-key-names

Frequently asked

questions

It can be exploitable through the SigNoz API when the endpoint is network-accessible and the attacker has valid credentials with Viewer privileges or higher.

No. The described attack requires authentication, but Viewer-level access or higher may be sufficient.

Keep user-controlled field names separate from SQL syntax by using parameterization where possible, strict allowlists, and database-specific identifier escaping where parameterization does not apply.

Treat all API-provided query components as untrusted, enforce least-privilege database access, review query construction during code review, and monitor API and ClickHouse logs for anomalous query behavior.

Find out what's already
exploitable in your codebase.