CVE-2025-24791: Snowflake sdk Snowflake-sdk May Incorrectly Validate Temporary Vulnerability

MODERATE
Advisory Identifier: GHSA-xfhv-wqj6-rx99
CVSS 4.4
CWE-281
Published
Advisory Summary

CVE-2025-24791 is a MODERATE (CVSS 4.4) snowflake-sdk may incorrectly validate temporary vulnerability (CWE-281: Improper Preservation of Permissions) affecting Snowflake sdk libraries in the npm ecosystem. The issue involves snowflake-sdk may incorrectly validate temporary credential cache file permissions. Remediation is available by upgrading affected packages to version 2.0.2.

CVE-2025-24791 at a Glance

CVE Identifier CVE-2025-24791
GHSA Identifier GHSA-xfhv-wqj6-rx99
Severity MODERATE
CVSS v3.1 Base Score 4.4
CWE Classification CWE-281: Improper Preservation of Permissions
Affected Product Snowflake sdk
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 4.4

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

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

How to Fix CVE-2025-24791

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: 2.0.2
npm install snowflake-sdk@2.0.2
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-2025-24791, 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 2.0.2), 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-281: Improper Preservation of Permissions, where the product does not preserve permissions or incorrectly preserves permissions when copying, restoring, or sharing objects, which can cause them to have less restrictive permissions than intended. 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 discovered and remediated a vulnerability in the Snowflake NodeJS Driver. File permissions checks of the temporary credential cache could be bypassed by an attacker with write access to the local cache directory. This vulnerability affects versions 1.12.0 through 2.0.1 on Linux. Snowflake fixed the issue in version 2.0.2. ### Vulnerability Details On Linux, when either EXTERNALBROWSER or USERNAME_PASSWORD_MFA authentication methods are used with temporary credential caching enabled, the Snowflake NodeJS Driver will cache temporary credentials in a local file. Due to a bug, the check verifying that the cache file can be accessed only by the user running the Driver always succeeded, but didn’t verify the permissions or the ownership correctly. An attacker with write access to the local cache folder could plant an empty file there and the Driver would use it to store temporary credentials instead of rejecting it due to overly broad permissions. ### Solution Snowflake released version 2.0.2 of the Snowflake NodeJS Driver, which fixes this issue. We recommend users upgrade to version 2.0.2. ### 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-2025-24791 Affected Snowflake sdk Versions

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

References

Frequently Asked Questions

What is CVE-2025-24791?
CVE-2025-24791 is a security vulnerability in Snowflake sdk involving snowflake-sdk may incorrectly validate temporary credential cache file permissions under CWE-281: Improper Preservation of Permissions.
Which Snowflake sdk versions are affected?
Affected versions include releases prior to 2.0.2 across affected packages: snowflake-sdk.
What version fixes CVE-2025-24791?
Upgrading to 2.0.2 (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 2.0.2. Upgrade your dependency to 2.0.2 or later.
What is the CVSS score of CVE-2025-24791?
CVE-2025-24791 has a CVSS v3.1 base score of 4.4 (MODERATE) with vector string CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N.
What CWE is associated with CVE-2025-24791?
CVE-2025-24791 is classified under CWE-281: Improper Preservation of Permissions (The product does not preserve permissions or incorrectly preserves permissions when copying, restoring, or sharing objects, which can cause them to have less restrictive permissions than intended.).
How can I check npm dependencies for CVE-2025-24791?
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-xfhv-wqj6-rx99",
  "modified" : "2025-08-21T04:04:51Z",
  "published" : "2025-01-29T18:42:26Z",
  "aliases" : [ "CVE-2025-24791" ],
  "summary" : "snowflake-sdk may incorrectly validate temporary credential cache file permissions",
  "details" : "### Issue\nSnowflake discovered and remediated a vulnerability in the Snowflake NodeJS Driver. File permissions checks of the temporary credential cache could be bypassed by an attacker with write access to the local cache directory.\n\nThis vulnerability affects versions 1.12.0 through 2.0.1 on Linux. Snowflake fixed the issue in version 2.0.2.\n\n### Vulnerability Details\nOn Linux, when either EXTERNALBROWSER or USERNAME_PASSWORD_MFA authentication methods are used with temporary credential caching enabled, the Snowflake NodeJS Driver will cache temporary credentials in a local file. Due to a bug, the check verifying that the cache file can be accessed only by the user running the Driver always succeeded, but didn’t verify the permissions or the ownership correctly. An attacker with write access to the local cache folder could plant an empty file there and the Driver would use it to store temporary credentials instead of rejecting it due to overly broad permissions.\n\n### Solution\nSnowflake released version 2.0.2 of the Snowflake NodeJS Driver, which fixes this issue. We recommend users upgrade to version 2.0.2.\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:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "snowflake-sdk"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.12.0"
      }, {
        "fixed" : "2.0.2"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 2.0.1"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/snowflakedb/snowflake-connector-nodejs/security/advisories/GHSA-xfhv-wqj6-rx99"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-24791"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/snowflakedb/snowflake-connector-nodejs/commit/89731b3a4d61a75b721d13d4e47a7a3712ffa45f"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/snowflakedb/snowflake-connector-nodejs"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-281" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-01-29T18:42:26Z",
    "nvd_published_at" : "2025-01-29T17:15:30Z"
  }
}