High

@cubejs-backend/api-gateway row level security bypass

  • Disclosed: 12.12.2022
  • Updated: 11.10.2026 10:22

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.

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
npm package @cubejs-backend/api-gateway >= 0.31.23, < 0.31.24 0.31.24

References

CVSS score 7.7/10
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N
Weakness (CWE)
CWE-89
Platform
npm
Package
@cubejs-backend/api-gateway
Disclosed
12.12.2022
Updated
11.10.2026 10:22

Sources and licenses

OSV / GitHub Advisory Database - GHSA-6jqm-3c9g-pch7 - CC BY 4.0

Vulnerability history: @cubejs-backend/api-gateway

All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.

Total entries
3
First → latest
11.2019 12.2023
Without a fix
0
Exploited in attacks
0

Severity breakdown

  • High 2
  • Medium 1

Disclosures per year

  1. 2019: 1
  2. 2020: 0
  3. 2021: 0
  4. 2022: 1
  5. 2023: 1
  6. 2024: 0
  7. 2025: 0
  8. 2026: 0
  1. Medium · 6.5 CVE-2023-50709 < 0.34.34 0.34.34
  2. @cubejs-backend/api-gateway row level security bypass this entry
    High · 7.7 CVE-2022-23510 >= 0.31.23, < 0.31.24 0.31.24
  3. High ghsa-4j6x-w426-6rc6 >= 0.11.0, < 0.11.17 0.11.17

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.