Executive brief
The Snowflake Connector for Python is a library used to connect applications to Snowflake data warehouses. A vulnerability in the write_pandas function fails to properly sanitize user-supplied arguments, allowing an attacker to inject arbitrary SQL commands that execute in the context of the current session, potentially leading to unauthorized data access, modification, or deletion.
Technical details
The snowflake.connector.pandas_tools module contains a SQL injection vulnerability in the write_pandas function due to improper argument sanitization and lack of query parameterization (CWE-89). An attacker who can control the function's arguments can inject crafted SQL syntax to modify the intended SQL command. The attack vector is local with low privilege requirements and high attack complexity; exploitation requires user interaction or specific application logic to pass attacker-controlled input to write_pandas. Any injected SQL executes in the context of the current authenticated session. The vulnerability affects versions 2.2.5 through 3.13.0; Snowflake released version 3.13.1 with a fix.
Affected products
- Snowflake Connector for Python 2.2.5 through 3.13.0
Timeline
- 2025-01-29: disclosed
- 2025-01-29: patched: Fixed in version 3.13.1