OneUptime, a service monitoring solution, contains a SQL injection issue. Specifically, the `toSortStatement`, `toSelectStatement`, and `toGroupByStatement` methods within the `StatementGenerator` component do not validate user-supplied object keys before interpolating them as ClickHouse Identifier parameters. This allows an attacker to inject arbitrary SQL code through crafted `sort`, `select`, or `groupBy` keys in API requests. The issue stems from the lack of validation when constructing SQL queries, as ClickHouse Identifier parameters are substituted directly into queries without escaping. This impacts any analytics list or aggregate endpoint backed by `BaseAnalyticsAPI.getList()` or `BaseAnalyticsAPI.getAggregate()`, including analytics queries for logs, metrics, spans, and exceptions. The vulnerable parameters are found in the request body, specifically `sort`, `select`, and `groupBy`. The vulnerable methods are `toSortStatement()`, `toSelectStatement()`, and `toGroupByStatement()`.