Executive brief
The Snowflake NodeJS Driver is a library used by applications to connect to Snowflake data warehouses. When using certain authentication methods with temporary credential caching enabled on Linux, the driver fails to properly validate file permissions on cached credentials, allowing a local attacker with write access to the cache directory to inject malicious files. This could lead to unauthorized access to cached authentication tokens and potential compromise of Snowflake database access.
Technical details
This vulnerability is a permission validation bypass (CWE-281) affecting the temporary credential cache functionality in the Snowflake NodeJS Driver versions 1.12.0 through 2.0.1 on Linux. When EXTERNALBROWSER or USERNAME_PASSWORD_MFA authentication is used with credential caching enabled, the driver caches temporary credentials in a local file. The vulnerable code's permission check always succeeds without properly verifying file permissions or ownership, allowing an attacker with write access to the cache directory to plant an empty file. The driver then uses this attacker-controlled file to store sensitive temporary credentials. Exploitation requires local file system access and is only possible on Linux systems. Snowflake released version 2.0.2 to fix this issue.
Affected products
- Snowflake snowflake-sdk 1.12.0 through 2.0.1
Timeline
- 2025-01-29: disclosed
- 2025-01-29: patched: Version 2.0.2 released