SQL Injection via a specially crafted request in the legacy SQL planner
Description
Impact
A specially crafted request may allow an authenticated user to perform SQL injection in Cube deployments using the legacy SQL planner. The issue affects time zone handling and may result in unauthorized data access or service disruption, depending on the data source's permissions and configuration. Data modification has not been established for this assessment.
Affected Versions
< 1.4.5>= 1.5.0, < 1.6.73>= 1.7.0, < 1.7.24
These ranges include early Cube releases and exclude patched maintenance releases. The issue affects deployments using the legacy planner. Starting with Cube 1.7.0, Tesseract is the default; affected 1.7.x deployments have the legacy planner selected with CUBEJS_TESSERACT_SQL_PLANNER=false.
Affected components: @cubejs-backend/api-gateway, @cubejs-backend/schema-compiler, @cubejs-backend/server-core, @cubejs-backend/shared.
Patches
Upgrade to a patched version:
- 1.7.24 or later in the 1.7.x release line
- 1.6.73 in the 1.6.x release line
- 1.4.5 in the 1.4.x release line
Update the Cube server and the affected backend packages together.
Workarounds
Where supported, selecting Tesseract provides a temporary mitigation.
References
Reported and fixed by Dmitrii Patsura (@ovr).
Affected versions
- @cubejs-backend/api-gatewayfixed in 1.4.5
- @cubejs-backend/api-gatewayFrom 1.5.0 · fixed in 1.6.73
- @cubejs-backend/api-gatewayFrom 1.7.0 · fixed in 1.7.24
- @cubejs-backend/schema-compilerfixed in 1.4.5
- @cubejs-backend/schema-compilerFrom 1.5.0 · fixed in 1.6.73
- @cubejs-backend/schema-compilerFrom 1.7.0 · fixed in 1.7.24
- @cubejs-backend/server-corefixed in 1.4.5
- @cubejs-backend/server-coreFrom 1.5.0 · fixed in 1.6.73
- @cubejs-backend/server-coreFrom 1.7.0 · fixed in 1.7.24
- @cubejs-backend/sharedfixed in 1.4.5
- @cubejs-backend/sharedFrom 1.5.0 · fixed in 1.6.73
- @cubejs-backend/sharedFrom 1.7.0 · fixed in 1.7.24