CVE-2023-34232: Snowflake sdk Snowflake NodeJS Driver Vulnerable To Vulnerability

HIGH
Advisory Identifier: GHSA-h53w-7qw7-vh5c
CVSS 7.3
CWE-77
Published
Advisory Summary

CVE-2023-34232 is a HIGH (CVSS 7.3) snowflake nodejs driver vulnerable to vulnerability (CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection')) affecting Snowflake sdk libraries in the npm ecosystem. The issue involves snowflake nodejs driver vulnerable to command injection. Remediation is available by upgrading affected packages to version 1.6.21.

CVE-2023-34232 at a Glance

CVE Identifier CVE-2023-34232
GHSA Identifier GHSA-h53w-7qw7-vh5c
Severity HIGH
CVSS v3.1 Base Score 7.3
CWE Classification CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection')
Affected Product Snowflake sdk
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 7.3

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:R/S:U/C:H/I:H/A:N).

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

How to Fix CVE-2023-34232

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

snowflake-sdk fixed: 1.6.21
npm install snowflake-sdk@1.6.21
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 snowflake-sdk

How to Check if You Are Affected

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

npm ls snowflake-sdk

Analyze the terminal output to locate any version of Snowflake sdk in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.6.21), your application is affected.

Note: The npm ls snowflake-sdk 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-77: Improper Neutralization of Special Elements used in a Command ('Command Injection'), where the product constructs all or part of a command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended command when it is sent to a downstream component. In Snowflake sdk, 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

### Issue Snowflake was informed via our bug bounty program of a command injection vulnerability in the Snowflake NodeJS driver via SSO browser URL authentication. ### Impacted driver package: snowflake-connector-nodejs ### Impacted version range: before [Version 1.6.21](https://community.snowflake.com/s/article/Node-js-Driver-Release-Notes) ### Attack Scenario In order to exploit the potential for command injection, an attacker would need to be successful in (1) establishing a malicious resource and (2) redirecting users to utilize the resource. The attacker could set up a malicious, publicly accessible server which responds to the SSO URL with an attack payload. If the attacker then tricked a user into visiting the maliciously crafted connection URL, the user’s local machine would render the malicious payload, leading to a remote code execution. This attack scenario can be mitigated through URL whitelisting as well as common anti-phishing resources. ### Solution On April 18, 2023, Snowflake merged a patch that fixed a command injection vulnerability in the Snowflake NodeJS driver via SSO browser URL authentication. The vulnerability affected the Snowflake NodeJS driver before Version 1.6.21. We strongly recommend users upgrade to Version 1.6.21 as soon as possible via the following resources: [Snowflake NodeJS Driver](https://docs.snowflake.com/en/developer-guide/node-js/nodejs-driver) ### Additional Information If you discover a security vulnerability in one of our products or websites, please report the issue to HackerOne. For more information, please see our [Vulnerability Disclosure Policy](https://hackerone.com/snowflake?type=team).

CVE-2023-34232 Affected Snowflake sdk Versions

1 component(s)
Fixed Versions:
1.6.21
Product / Package Ecosystem Affected Versions Fixed Version
snowflake-sdk
npm
< 1.6.21
1.6.21

References

Frequently Asked Questions

What is CVE-2023-34232?
CVE-2023-34232 is a security vulnerability in Snowflake sdk involving Snowflake NodeJS Driver vulnerable to Command Injection under CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection').
Which Snowflake sdk versions are affected?
Affected versions include releases prior to 1.6.21 across affected packages: snowflake-sdk.
What version fixes CVE-2023-34232?
Upgrading to 1.6.21 (or the latest patched release for your respective branch) resolves the vulnerability.
Is snowflake-sdk affected?
Yes, snowflake-sdk is affected in releases prior to 1.6.21. Upgrade your dependency to 1.6.21 or later.
What is the CVSS score of CVE-2023-34232?
CVE-2023-34232 has a CVSS v3.1 base score of 7.3 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N.
What CWE is associated with CVE-2023-34232?
CVE-2023-34232 is classified under CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection') (The product constructs all or part of a command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended command when it is sent to a downstream component.).
How can I check npm dependencies for CVE-2023-34232?
Run the dependency tree command: 'npm ls snowflake-sdk'. 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-h53w-7qw7-vh5c",
  "modified" : "2023-06-09T22:53:51Z",
  "published" : "2023-06-09T22:53:51Z",
  "aliases" : [ "CVE-2023-34232" ],
  "summary" : "Snowflake NodeJS Driver vulnerable to Command Injection",
  "details" : "### Issue\nSnowflake was informed via our bug bounty program of a command injection vulnerability in the Snowflake NodeJS driver via SSO browser URL authentication.\n\n### Impacted driver package: \nsnowflake-connector-nodejs\n\n### Impacted version range: \nbefore [Version 1.6.21](https://community.snowflake.com/s/article/Node-js-Driver-Release-Notes) \n\n### Attack Scenario\nIn order to exploit the potential for command injection, an attacker would need to be successful in (1) establishing a malicious resource and (2) redirecting users to utilize the resource. The attacker could set up a malicious, publicly accessible server which responds to the SSO URL with an attack payload. If the attacker then tricked a user into visiting the maliciously crafted connection URL, the user’s local machine would render the malicious payload, leading to a remote code execution. \n\nThis attack scenario can be mitigated through URL whitelisting as well as common anti-phishing resources.  \n\n### Solution\nOn April 18, 2023, Snowflake merged a patch that fixed a command injection vulnerability in the Snowflake NodeJS driver via SSO browser URL authentication. The vulnerability affected the Snowflake NodeJS driver before Version 1.6.21. We strongly recommend users upgrade to Version 1.6.21 as soon as possible via the following resources: [Snowflake NodeJS Driver](https://docs.snowflake.com/en/developer-guide/node-js/nodejs-driver)\n\n### Additional Information\nIf you discover a security vulnerability in one of our products or websites, please report the issue to HackerOne. For more information, please see our [Vulnerability Disclosure Policy](https://hackerone.com/snowflake?type=team).",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "snowflake-sdk"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.6.21"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/snowflakedb/snowflake-connector-nodejs/security/advisories/GHSA-h53w-7qw7-vh5c"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-34232"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/snowflakedb/snowflake-connector-nodejs/pull/465"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/snowflakedb/snowflake-connector-nodejs/commit/0c9622ae12cd7d627df404b73a783b4a5f60728a"
  }, {
    "type" : "WEB",
    "url" : "https://community.snowflake.com/s/article/Node-js-Driver-Release-Notes"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/snowflakedb/snowflake-connector-nodejs"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-77" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-06-09T22:53:51Z",
    "nvd_published_at" : "2023-06-08T21:15:17Z"
  }
}