CVE-2023-34230: Snowflake.Data Snowflake Connector .Net Command Injection Vulnerability

HIGH
Advisory Identifier: GHSA-223g-8w3x-98wr
CVSS 7.3
CWE-77
Published
Advisory Summary

CVE-2023-34230 is a HIGH (CVSS 7.3) snowflake connector .net command injection vulnerability (CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection')) affecting Snowflake.Data libraries in the NuGet ecosystem. The issue involves snowflake connector .net command injection. Remediation is available by upgrading affected packages to version 2.0.18.

CVE-2023-34230 at a Glance

CVE Identifier CVE-2023-34230
GHSA Identifier GHSA-223g-8w3x-98wr
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.Data
Package Ecosystem NuGet
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-34230

To remediate this vulnerability, upgrade all affected Snowflake.Data 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.Data fixed: 2.0.18
Upgrade Snowflake.Data to 2.0.18
Verify Direct and Transitive Dependencies

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

inspect dependencies for Snowflake.Data

How to Check if You Are Affected

To determine whether your application is affected by CVE-2023-34230, inspect your project dependencies for Snowflake.Data:

inspect dependencies for Snowflake.Data

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

Note: Verify declared build manifests and deployed runtime container environments.

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.Data, 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 .NET driver via SSO URL authentication. ### Impacted driver package: snowflake-connector-net ### Impacted version range: before [Version 2.0.18](https://community.snowflake.com/s/article/Dot-NET-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 December 2nd, 2022, Snowflake merged a patch that fixed a command injection vulnerability in the Snowflake .NET driver via SSO URL authentication. The vulnerability affected the Snowflake .NET driver before Version 2.0.18. We strongly recommend upgrading to the latest driver version as soon as possible via the following resources: [Snowflake .NET Driver](https://docs.snowflake.com/en/developer-guide/dotnet/dotnet-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-34230 Affected Snowflake.Data Versions

1 component(s)
Fixed Versions:
2.0.18
Product / Package Ecosystem Affected Versions Fixed Version
Snowflake.Data
NuGet
< 2.0.18
2.0.18

References

Frequently Asked Questions

What is CVE-2023-34230?
CVE-2023-34230 is a security vulnerability in Snowflake.Data involving Snowflake Connector .Net Command Injection under CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection').
Which Snowflake.Data versions are affected?
Affected versions include releases prior to 2.0.18 across affected packages: Snowflake.Data.
What version fixes CVE-2023-34230?
Upgrading to 2.0.18 (or the latest patched release for your respective branch) resolves the vulnerability.
Is Snowflake.Data affected?
Yes, Snowflake.Data is affected in releases prior to 2.0.18. Upgrade your dependency to 2.0.18 or later.
What is the CVSS score of CVE-2023-34230?
CVE-2023-34230 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-34230?
CVE-2023-34230 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 NuGet dependencies for CVE-2023-34230?
Run the dependency tree command: 'inspect dependencies for Snowflake.Data'. 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-223g-8w3x-98wr",
  "modified" : "2023-06-09T22:40:23Z",
  "published" : "2023-06-09T22:40:23Z",
  "aliases" : [ "CVE-2023-34230" ],
  "summary" : "Snowflake Connector .Net Command Injection",
  "details" : "### Issue\nSnowflake was informed via our bug bounty program of a command injection vulnerability in the Snowflake .NET driver via SSO URL authentication.\n\n### Impacted driver package: \nsnowflake-connector-net\n\n### Impacted version range: \nbefore [Version 2.0.18](https://community.snowflake.com/s/article/Dot-NET-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 December 2nd, 2022, Snowflake merged a patch that fixed a command injection vulnerability in the Snowflake .NET driver via SSO URL authentication. The vulnerability affected the Snowflake .NET driver before Version 2.0.18. We strongly recommend upgrading to the latest driver version as soon as possible via the following resources: [Snowflake .NET Driver](https://docs.snowflake.com/en/developer-guide/dotnet/dotnet-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" : "NuGet",
      "name" : "Snowflake.Data"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.0.18"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/snowflakedb/snowflake-connector-net/security/advisories/GHSA-223g-8w3x-98wr"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-34230"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/snowflakedb/snowflake-connector-net"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-77" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-06-09T22:40:23Z",
    "nvd_published_at" : "2023-06-08T21:15:17Z"
  }
}