Vulnerabilities in pkg:npm/@cubejs-backend/api-gateway

PACKAGE
Advisory Identifier: GHSA-9759-3276-g2pm
Advisory Summary

CVE-2023-50709 is a MODERATE (CVSS 6.5) denial of service vulnerability (CWE-20: Improper Input Validation) affecting @cubejs backend/api gateway libraries in the npm ecosystem. The issue involves cube api denial of service attack. Remediation is available by upgrading affected packages to version 0.34.34.

3 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/@cubejs-backend/api-gateway

3 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/@cubejs-backend/api-gateway. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-9759-3276-g2pm CVE-2023-50709 MODERATE Cube API denial of service attack
GHSA-6jqm-3c9g-pch7 CVE-2022-23510 HIGH @cubejs-backend/api-gateway row level security bypass
GHSA-4j6x-w426-6rc6 - HIGH Default Express middleware security check is ignored in production

CVE-2023-50709 at a Glance

CVE Identifier CVE-2023-50709
GHSA Identifier GHSA-9759-3276-g2pm
Severity MODERATE
CVSS v3.1 Base Score 6.5
CWE Classification CWE-20: Improper Input Validation
Affected Product @cubejs backend/api gateway
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 6.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2023-50709

To remediate this vulnerability, upgrade all affected @cubejs backend/api gateway dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

@cubejs-backend/api-gateway fixed: 0.34.34
npm install @cubejs-backend/api-gateway@0.34.34
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls @cubejs-backend/api-gateway

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2023-50709, inspect your project dependencies using npm:

npm ls @cubejs-backend/api-gateway

Analyze the terminal output to locate any version of @cubejs backend/api gateway in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.34.34), your application is affected.

Note: The npm ls @cubejs-backend/api-gateway command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-20: Improper Input Validation, where the product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. In @cubejs backend/api gateway, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact It is possible to make the entire Cube API unavailable by submitting a specially crafted request to a Cube API endpoint. ### Patches The issue has been patched in the `v0.34.34` and it's recommended that all users exposing Cube APIs to the public internet upgrade to the latest version to prevent service disruption. ### Workarounds There are currently no workaround for older versions, and the recommendation is to upgrade. ### References The issue was reported by [y0d3n](https://github.com/y0d3n) in our Community Slack and has been promptly patched in the recent update.

CVE-2023-50709 Affected @cubejs backend/api gateway Versions

1 component(s)
Fixed Versions:
0.34.34
Product / Package Ecosystem Affected Versions Fixed Version
@cubejs-backend/api-gateway
npm
< 0.34.34
0.34.34

References

Frequently Asked Questions

What is CVE-2023-50709?
CVE-2023-50709 is a security vulnerability in @cubejs backend/api gateway involving Cube API denial of service attack under CWE-20: Improper Input Validation.
Which @cubejs backend/api gateway versions are affected?
Affected versions include releases prior to 0.34.34 across affected packages: @cubejs-backend/api-gateway.
What version fixes CVE-2023-50709?
Upgrading to 0.34.34 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @cubejs-backend/api-gateway affected?
Yes, @cubejs-backend/api-gateway is affected in releases prior to 0.34.34. Upgrade your dependency to 0.34.34 or later.
What is the CVSS score of CVE-2023-50709?
CVE-2023-50709 has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2023-50709?
CVE-2023-50709 is classified under CWE-20: Improper Input Validation (The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.).
How can I check npm dependencies for CVE-2023-50709?
Run the dependency tree command: 'npm ls @cubejs-backend/api-gateway'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-9759-3276-g2pm",
  "modified" : "2023-12-19T20:39:57Z",
  "published" : "2023-12-13T23:15:56Z",
  "aliases" : [ "CVE-2023-50709" ],
  "summary" : "Cube API denial of service attack",
  "details" : "### Impact\nIt is possible to make the entire Cube API unavailable by submitting a specially crafted request to a Cube API endpoint.\n\n### Patches\nThe issue has been patched in the `v0.34.34` and it's recommended that all users exposing Cube APIs to the public internet upgrade to the latest version to prevent service disruption.\n\n### Workarounds\nThere are currently no workaround for older versions, and the recommendation is to upgrade.\n\n### References\nThe issue was reported by [y0d3n](https://github.com/y0d3n) in our Community Slack and has been promptly patched in the recent update.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@cubejs-backend/api-gateway"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.34.34"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/cube-js/cube/security/advisories/GHSA-9759-3276-g2pm"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-50709"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/cube-js/cube"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/cube-js/cube/releases/tag/v0.34.34"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-20" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-12-13T23:15:56Z",
    "nvd_published_at" : "2023-12-13T22:15:43Z"
  }
}