CVE-2023-34231: Github.com/snowflakedb/gosnowflake Snowflake Golang Driver Vulnerable To Vulnerability
HIGHCVE-2023-34231 is a HIGH (CVSS 7.3) snowflake golang driver vulnerable to vulnerability (CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection')) affecting Github.com/snowflakedb/gosnowflake libraries in the Go ecosystem. The issue involves snowflake golang driver vulnerable to command injection. Remediation is available by upgrading affected packages to version 1.6.19.
CVE-2023-34231 at a Glance
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).
How to Fix CVE-2023-34231
To remediate this vulnerability, upgrade all affected Github.com/snowflakedb/gosnowflake dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/snowflakedb/gosnowflake to 1.6.19
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/snowflakedb/gosnowflake
How to Check if You Are Affected
To determine whether your application is affected by CVE-2023-34231, inspect your project dependencies for Github.com/snowflakedb/gosnowflake:
inspect dependencies for github.com/snowflakedb/gosnowflake
Analyze the terminal output to locate any version of Github.com/snowflakedb/gosnowflake in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.6.19), 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 Github.com/snowflakedb/gosnowflake, 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
CVE-2023-34231 Affected Github.com/snowflakedb/gosnowflake Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/snowflakedb/gosnowflake
|
Go |
< 1.6.19
|
1.6.19
|
References
Frequently Asked Questions
What is CVE-2023-34231?
Which Github.com/snowflakedb/gosnowflake versions are affected?
What version fixes CVE-2023-34231?
Is github.com/snowflakedb/gosnowflake affected?
What is the CVSS score of CVE-2023-34231?
What CWE is associated with CVE-2023-34231?
How can I check Go dependencies for CVE-2023-34231?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-fwv2-65wh-2w8c",
"modified" : "2023-06-09T22:53:25Z",
"published" : "2023-06-09T22:53:25Z",
"aliases" : [ "CVE-2023-34231" ],
"summary" : "Snowflake Golang Driver vulnerable to Command Injection",
"details" : "### Issue\nSnowflake was informed via our bug bounty program of a command injection vulnerability in the Snowflake Golang driver via SSO browser URL authentication.\n\n### Impacted driver package: \ngosnowflake\n\n### Impacted version range: \nbefore [Version 1.6.19](https://community.snowflake.com/s/article/Go-Snowflake-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 March 21, 2023, Snowflake merged a patch that fixed a command injection vulnerability in the Snowflake Golang driver via SSO browser URL authentication. The vulnerability affected the Snowflake Golang driver before Version 1.6.19. We strongly recommend users upgrade to Version 1.6.19 as soon as possible via the following resources: [Go Snowflake Driver](https://docs.snowflake.com/en/developer-guide/golang/go-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" : "Go",
"name" : "github.com/snowflakedb/gosnowflake"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.6.19"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/snowflakedb/gosnowflake/security/advisories/GHSA-fwv2-65wh-2w8c"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-34231"
}, {
"type" : "WEB",
"url" : "https://github.com/snowflakedb/gosnowflake/pull/757"
}, {
"type" : "WEB",
"url" : "https://github.com/snowflakedb/gosnowflake/commit/e11a2a555f1b9f7adc1f01fb7b5e7f38fbbb2a1c"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/snowflakedb/gosnowflake"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-77" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2023-06-09T22:53:25Z",
"nvd_published_at" : "2023-06-08T20:15:09Z"
}
}