Skip to main content

CVE-2025-46328: CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition in snowflakedb snowflake-connector-nodejs

Low
VulnerabilityCVE-2025-46328cvecve-2025-46328cwe-367
Published: Mon Apr 28 2025 (04/28/2025, 22:33:09 UTC)
Source: CVE
Vendor/Project: snowflakedb
Product: snowflake-connector-nodejs

Description

snowflake-connector-nodejs is a NodeJS driver for Snowflake. Versions starting from 1.10.0 to before 2.0.4, are vulnerable to a Time-of-Check to Time-of-Use (TOCTOU) race condition. When using the Easy Logging feature on Linux and macOS the Driver reads logging configuration from a user-provided file. On Linux and macOS the Driver verifies that the configuration file can be written to only by its owner. That check was vulnerable to a TOCTOU race condition and failed to verify that the file owner matches the user running the Driver. This could allow a local attacker with write access to the configuration file or the directory containing it to overwrite the configuration and gain control over logging level and output location. This issue has been patched in version 2.0.4.

AI-Powered Analysis

AILast updated: 06/24/2025, 23:20:41 UTC

Technical Analysis

CVE-2025-46328 is a vulnerability identified in the snowflake-connector-nodejs, a NodeJS driver used to interface with Snowflake, a cloud-based data warehousing service. The affected versions range from 1.10.0 up to but not including 2.0.4. The vulnerability is a Time-of-Check to Time-of-Use (TOCTOU) race condition categorized under CWE-367. Specifically, this issue arises when the Easy Logging feature is enabled on Linux and macOS systems. The driver reads its logging configuration from a user-supplied file and performs a security check to ensure that the file is writable only by its owner. However, the check is flawed because it does not verify that the file owner matches the user executing the driver. Due to this race condition, a local attacker who has write access to the configuration file or its containing directory can exploit the timing gap between the ownership check and the actual use of the file. This allows the attacker to overwrite the logging configuration, potentially controlling the logging level and redirecting log output to arbitrary locations. Such manipulation could be leveraged to hide malicious activity or escalate privileges indirectly by influencing log behavior. The vulnerability requires local access with limited privileges (PR:L) but does not require user interaction (UI:N). The CVSS v3.1 base score is 3.3, indicating a low severity primarily due to the limited impact on confidentiality and no impact on integrity or availability. The issue has been addressed and patched in version 2.0.4 of the snowflake-connector-nodejs driver. No known exploits have been reported in the wild to date.

Potential Impact

For European organizations utilizing Snowflake with the snowflake-connector-nodejs driver on Linux or macOS environments, this vulnerability poses a localized risk. Since exploitation requires local access with write permissions to the logging configuration file or its directory, the threat is primarily to internal systems or developer environments rather than remote attackers. Potential impacts include unauthorized modification of logging configurations, which can lead to obfuscation of malicious activities or misdirected logs, complicating incident detection and response. Although the vulnerability does not directly compromise data confidentiality, integrity, or availability, it can indirectly aid attackers in maintaining persistence or evading detection. Organizations with strict compliance requirements around audit logging and monitoring may find this particularly concerning. The risk is mitigated if proper file system permissions and user access controls are enforced. However, in environments where multiple users share development or operational systems, or where local privilege escalation is possible, the vulnerability could be leveraged as part of a broader attack chain. Given the low CVSS score and the requirement for local access, the overall impact is limited but should not be ignored in sensitive or high-security contexts.

Mitigation Recommendations

1. Upgrade the snowflake-connector-nodejs driver to version 2.0.4 or later, where the vulnerability has been patched. 2. Restrict write permissions on the logging configuration file and its containing directory to trusted users only, ensuring that only the intended owner can modify these files. 3. Implement strict user access controls and minimize the number of users with write access to system and application directories, especially on Linux and macOS systems running Snowflake connectors. 4. Employ file integrity monitoring solutions to detect unauthorized changes to logging configuration files. 5. Use containerization or sandboxing to isolate the Snowflake connector processes, limiting the potential impact of local exploits. 6. Regularly audit and review logging configurations and outputs to detect anomalies or unexpected changes. 7. Educate developers and system administrators about the risks of TOCTOU race conditions and the importance of secure file handling practices. 8. Where possible, disable the Easy Logging feature if it is not required, to reduce the attack surface.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
GitHub_M
Date Reserved
2025-04-22T22:41:54.911Z
Cisa Enriched
true
Cvss Version
3.1
State
PUBLISHED

Threat ID: 682d983dc4522896dcbef04e

Added to database: 5/21/2025, 9:09:17 AM

Last enriched: 6/24/2025, 11:20:41 PM

Last updated: 8/10/2025, 4:45:16 AM

Views: 14

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats