Cube.js API Gateway authentication middleware bypass in production

Severity: info · Published 2019-11-08

Cube.js is an open-source analytics platform that provides an API gateway for querying data. In production deployments, the default Express middleware authentication check is bypassed, allowing unauthenticated access to the API gateway. This could expose sensitive analytics data and allow unauthorized users to query or manipulate data without proper authorization.

Technologies: @cubejs-backend/api-gateway (npm). Vendors: npm.

Quick answers

Is This vulnerability exploited in the wild?
No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.
How severe is This vulnerability?
Informational severity, published 8 November 2019.
Which products and versions are affected?
@cubejs-backend/api-gateway (npm) SEMVER:introduced=0.11.0,fixed=0.11.17.
Is there a fix for This vulnerability?
Yes. @cubejs-backend/api-gateway (npm): upgrade to 0.11.17 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is This vulnerability attacked?
It is attacked over the network, in a software library.
Am I affected?
Check whether you run @cubejs-backend/api-gateway (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • @cubejs-backend/api-gateway (npm): upgrade to 0.11.17 or later
    npm install @cubejs-backend/api-gateway@0.11.17

Technical details

The vulnerability exists in @cubejs-backend/api-gateway versions 0.11.0 through 0.11.16, where the default Express authentication middleware is not properly enforced in production environments. This is an authentication bypass vulnerability affecting the API gateway's security middleware. The root cause appears to be conditional logic that incorrectly disables or skips the checkAuthMiddleware function when running in production mode. An attacker on the network can make unauthenticated requests to the API gateway endpoints without credentials, gaining unauthorized access to analytics data and potentially manipulating queries. The vulnerability requires network-level access to the Cube.js deployment. A patch is available in version 0.11.17, and users can immediately mitigate by manually overriding the default authentication express middleware configuration.

Affected products

  • Cube.js @cubejs-backend/api-gateway 0.11.0 through 0.11.16

Timeline

  • 2019-11-08: disclosed
  • 2019-11-08: patched: Fixed in version 0.11.17

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.