CVE-2022-23510
JSON

9.6critical

SQl injection in cube-js

Severity
9.6critical CVSS:3.1 by GitHub_M
Exploit likelihood
0.99% (higher than 63% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-6jqm-3c9g-pch7

Description

cube-js is a headless business intelligence platform. In version 0.31.23 all authenticated Cube clients could bypass SQL row-level security and run arbitrary SQL via the newly introduced /v1/sql-runner endpoint. This issue has been resolved in version 0.31.24. Users are advised to either upgrade to 0.31.24 or to downgrade to 0.31.22. There are no known workarounds for this vulnerability.

Affected

Product or packageVersionsReported by
cube-js cube.js= 0.31.23CVE List
@cubejs-backend/api-gateway (npm)from 0.31.23 before 0.31.24GitHub Advisory Database
cube cube.js0.31.23NVD

All scores

GitHub_M9.6critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:N
GitHub7.7high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N
NVD8.8high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Classification

CWE-89

SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.

What each source says

CVE List

cube-js is a headless business intelligence platform. In version 0.31.23 all authenticated Cube clients could bypass SQL row-level security and run arbitrary SQL via the newly introduced /v1/sql-runner endpoint. This issue has been resolved in version 0.31.24. Users are advised to either upgrade to 0.31.24 or to downgrade to 0.31.22. There are no known workarounds for this vulnerability.

GitHub Advisory Database
Impact

All authenticated Cube clients could bypass row-level security and run arbitrary SQL via the newly introduced /v1/sql-runner endpoint.

Patches

The change has been reverted in 0.31.24

Workarounds

Upgrade to >=0.31.24 or downgrade to <=0.31.22

Post mortem

As part of implementing the Cube Cloud SQL runner functionality, we’ve added a new endpoint to the Cube Core so that we could add arbitrary queries directly to the queue, bypassing the modeling layer.

The endpoint was added in this commit: https://github.com/cube-js/cube.js/commit/f1e25bb50323c0b99f3891d349467e7b637baeea

It went through the code review; however, it slipped everyone’s attention that this endpoint completely bypasses any row-level security logic implemented in the modeling layer. Now anyone with a valid Cube JWT token could fetch any data, even if they were not allowed to do so by their security context.

The issue was noticed by the Core team on Dec 12 and immediately reverted.

The just-released 0.31.23 version of the Cube has been pulled out of all the registries, and a CVE was published on Github. Another change (https://github.com/cube-js/cube.js/commit/2c5db32f2ded074ebe5e83668eee8c024101240b) was also rolled back along with the SQL runner endpoint. It didn't pose a significant security threat, but it increased the attacker’s ability to enumerate cube schema, and it should be revisited.

The 0.31.24 was released to replace the revoked version with a change completely reverted. All customers are urged to upgrade to the newest Cube version.

NVD (es)

cube-js es una plataforma de inteligencia empresarial headless. En la versión 0.31.23, todos los clientes Cube autenticados podían eludir la seguridad de nivel de fila de SQL y ejecutar SQL arbitrario a través del endpoint /v1/sql-runner recientemente introducido. Este problema se resolvió en la versión 0.31.24. Se recomienda a los usuarios actualizar a 0.31.24 o bajar a 0.31.22. No se conocen workarounds para esta vulnerabilidad.

References

Sources

SourceRecordLicence
CVE ListCVE-2022-23510 changed 2025-04-23CVE Terms of Use
GitHub Advisory DatabaseGHSA-6jqm-3c9g-pch7 changed 2023-11-08CC-BY-4.0
NVDCVE-2022-23510 changed 2026-06-17Public domain