CVE-2025-24791: Snowflake sdk Snowflake-sdk May Incorrectly Validate Temporary Vulnerability
MODERATECVE-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
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).
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.
npm install snowflake-sdk@2.0.2
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
CVE-2025-24791 Affected Snowflake sdk Versions
1 component(s)| 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?
Which Snowflake sdk versions are affected?
What version fixes CVE-2025-24791?
Is snowflake-sdk affected?
What is the CVSS score of CVE-2025-24791?
What CWE is associated with CVE-2025-24791?
How can I check npm dependencies for CVE-2025-24791?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"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"
}
}