Back

Oxide Security Advisory 20260923-1: SQL injection in OxQL metrics queries

A user with read access to a single project can run arbitrary SQL against the ClickHouse metrics database through a crafted OxQL query. This allows the user to cause the ClickHouse zone to send HTTP requests to services on the rack’s internal network. Results are not returned through the OxQL interface.

Nexus translates OxQL queries into ClickHouse SQL. It rendered string literals by wrapping the raw value in single quotes without escaping, so a quote inside a filter value ended the literal early and the remainder was parsed as SQL.

Table 1. Revision History
RevisionDate (YYYYMMDD)Changes

1.0

20260923

Initial Release

Impacted Products

Release lineAffectedFixed in

23.x

Not affected

N/A 23.0

22.x and earlier

22.1 and earlier

22.2

Impact

A user with read access to any project on a rack can inject SQL into the queries the control plane sends to the ClickHouse metrics database. The injected SQL can make ClickHouse send arbitrary HTTP GET requests to services on the rack’s internal network. The attacker does not receive the responses.

On its own, this vulnerability has limited impact: GET requests do not modify state in any Oxide-developed API. However, an attacker could combine it with other vulnerabilities to reach internal services.

Action Required

Update to Oxide software version 23.0 or 22.2 following our update procedure. Systems running Oxide versions earlier than 22.x must update to 22.x before updating to 23.0.

Technical Background

OxQL is the query language for the rack’s metrics. Nexus translates each OxQL query into ClickHouse SQL before running it. When a query includes a string literal, such as a value in a filter, Nexus wrapped the raw value in single quotes and inserted it into the SQL text without escaping quote characters.

A value containing a single quote ended the string literal early, and the rest was interpreted as SQL. ClickHouse provides functions that make outbound HTTP requests to internal services, so a specially crafted query could invoke requests from the ClickHouse zone inappropriately.

ClickHouse does not return the responses to such requests through OxQL, so the flaw is a blind request-forgery primitive rather than a data-disclosure one.

The fix has three parts:

  • Escape quotes in string literals when translating OxQL to SQL.

  • Run metrics queries as a permission constrained ClickHouse user with restricted permissions.

  • Remove the ability to make HTTP requests from queries (planned for 24.0).