/

CVE-2026-57955

Severity:

HIGH RISK

(8.5)

SQL Injection (CWE-89) in SigNoz Alert History API

CVE-2026-57955

Deferred

Vulnerability type

Category:

SQL Injection

CWE:

CWE-89

Impact:

Unauthorized Data Access and Server-Side Request Forgery

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 through version 0.130.1 contains a SQL injection flaw in its alert-history endpoints where a rule ID path parameter is interpolated into ClickHouse queries without proper sanitization.

An authenticated attacker can inject URL-encoded quotes into the rule ID, execute arbitrary ClickHouse queries, and potentially read all traces, logs, and metrics or abuse ClickHouse functions for server-side request forgery.

Affected context

This vulnerability occurs in SigNoz deployments where alert-history endpoints are exposed and rely on a rule ID supplied via an HTTP path parameter.

The risk is present when:

  • ClickHouse is used as the backend for observability data,
  • The application constructs SQL queries with string interpolation instead of parameter binding,
  • The rule ID is treated as trusted input and not validated, escaped, or constrained.

Exploit preconditions

  • Attack surface: HTTP alert-history API endpoints accepting a rule ID path parameter.
  • Required access: Valid authenticated access to SigNoz with permissions to query alert history.
  • Trigger point: Submission of a crafted rule ID that injects URL-encoded quotes and SQL fragments into the interpolated ClickHouse query.
  • Why exploitation is possible: The rule ID is directly concatenated into SQL strings without parameterization or robust input validation, allowing the attacker-controlled value to alter query structure.

Why this happens

The underlying issue maps to CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection').

Application code dynamically builds ClickHouse queries by interpolating a rule ID path parameter into the query string.

Because the input is not sanitized and no prepared statements or bound parameters are used, special characters (such as quotes) can break out of the intended literal context and introduce arbitrary SQL clauses, including function calls like url().

This insecure pattern stems from treating user-provided identifiers as safe to embed directly into SQL, rather than enforcing strict typing, whitelisting, or parameterization.

Potential impact

  • Attackers may read all stored traces, logs, and metrics from ClickHouse.
  • Attackers could query sensitive internal observability metadata beyond their normal permissions.
  • Attackers may perform server-side request forgery (SSRF) using ClickHouse functions like url() to reach internal services.
  • Attackers could manipulate monitoring data, impacting incident response and reliability analysis.
  • Attackers can potentially pivot to other systems if internal endpoints exposed via SSRF are vulnerable.

General mitigation guidance

Effective mitigation focuses on eliminating direct string interpolation in SQL construction and reducing trust in request parameters.

Recommended design patterns include:

  • Use parameterized queries or prepared statements for all interactions with ClickHouse, ensuring values are bound as data rather than concatenated into SQL syntax.
  • Apply strict validation and whitelisting to identifiers like rule IDs (e.g., enforce allowed character sets, length limits, and structural constraints).
  • Introduce an intermediate abstraction for query building that disallows raw string injection and encodes values safely.
  • Reduce privileges for the database user used by SigNoz so it only has the minimum read/write access necessary for observability operations.
  • Limit or disable high-risk database functions (such as arbitrary HTTP/URL fetch mechanisms) where operationally feasible.

How teams detect issues like this

Organizations can detect this class of vulnerability and its exploitation using several approaches:

  • Static analysis rules that flag dynamic SQL construction using string concatenation or format operations involving HTTP parameters or path variables.
  • Code review checklists that require verification of parameterized queries and prohibit direct embedding of request data into SQL.
  • Runtime monitoring of ClickHouse query logs for anomalous patterns, such as unexpected url() function usage or queries referencing atypical system tables.
  • Application-layer logging that captures suspicious rule ID values containing encoded quotes or SQL meta-characters, coupled with alerting.
  • Security policies integrated into CI/CD pipelines that enforce use of query builder APIs or ORM layers designed to prevent SQL injection.

Sources

SourceLink
github.comgithub.com/SigNoz/signoz/issues/11747
vulncheck.comvulncheck.com/advisories/signoz-sql-injection-in-alert-history-endpoints-via-rule-id-parameter

Frequently asked

questions

Yes, it is reachable via SigNoz's HTTP alert-history API endpoints, but exploitation typically requires authenticated access to the application.

The attacker needs valid credentials and any role that can access the alert-history endpoints and provide a rule ID, as the injection occurs in that path parameter.

The most robust fix is to eliminate string-based query construction and use parameterized queries for ClickHouse, coupled with strict validation of the rule ID to ensure it conforms to an expected format.

Adopt secure coding standards that mandate parameterized queries, constrain user-controlled identifiers, avoid exposing powerful database functions to untrusted input, and integrate automated security testing and code review focused on input handling and query construction.

Find out what's already
exploitable in your codebase.