Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
📦 npm

GHSA-6jqm-3c9g-pch7

HIGH

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

Also known asCVE-2022-23510
Published
Dec 12, 2022
Updated
Nov 8, 2023
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed

EPSS Exploitation Probability

via FIRST.org ↗
0.9%probability of exploitation in next 30 days
Lower Risk55th percentile+0.49%
0.00%0.47%0.93%1.40%0.0%0.9%Dec 25Apr 26Jun 26

EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.

Blast Radius

1 pkg affected

Weekly download volume for affected packages — a proxy for how broadly this vulnerability is deployed.

@cubejs-backend/api-gatewaynpm
35Kdownloads / week

Description

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 Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
📦npm@cubejs-backend/api-gateway0.31.23&&< 0.31.240.31.24

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for @cubejs-backend/api-gateway. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.

  2. Fix

    Update @cubejs-backend/api-gateway to 0.31.24 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-6jqm-3c9g-pch7 is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 pinpoints whether GHSA-6jqm-3c9g-pch7 is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.

Tailored to GHSA-6jqm-3c9g-pch7. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Frequently Asked Questions

### 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/f1e25bb50323c0b99f3891d349467e7b637ba
O3 Security · Impact-Aware SCA

Is GHSA-6jqm-3c9g-pch7 in your dependencies?

O3 detects GHSA-6jqm-3c9g-pch7 across npm dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.