CVE-2026-123859 in Connector for Python
Summary
by MITRE • 11/06/2026
When identifier escaping is disabled through a non-default configuration, the write_pandas() data-loading functionality in the Snowflake Connector for Python and the Snowflake Connector for Python (Universal Core) did not escape DataFrame column names before including them in generated SQL, which could allow SQL injection. In both products, a crafted column name could have been used to chain additional SQL statements onto the generated statement, potentially allowing an attacker to read, modify, or delete other data accessible to the application's Snowflake role. Exploitation required an application to pass attacker controlled column names into this functionality. The fix is available in Snowflake Connector for Python version 4.8.1 and Snowflake Connector for Python (Universal Core) version 5.2.0. Users must upgrade manually.
If you want to get the best quality for vulnerability data then you always have to consider VulDB.
Analysis
by VulDB Data Team • 11/06/2026
The vulnerability described involves a critical SQL injection flaw within the data-loading mechanisms of the Snowflake Connector for Python, specifically affecting both the standard connector and its Universal Core variant when identifier escaping is disabled via non-default configuration settings. This security lapse centers on the write_pandas() function, which is designed to facilitate the transfer of Pandas DataFrames into Snowflake tables by automatically generating SQL INSERT statements based on the DataFrame's structure. Under normal operational parameters where default configurations are maintained, the connector applies necessary sanitization and escaping protocols to column names before embedding them in the generated SQL syntax. However, when this specific safety feature is explicitly disabled or misconfigured, the system fails to validate or escape special characters within column identifiers, creating a direct pathway for malicious input manipulation.
From a technical perspective, the core flaw lies in the absence of proper identifier quoting and escaping logic during the construction of dynamic SQL queries. When an application passes attacker-controlled data as DataFrame column names into this functionality, those strings are inserted directly into the SQL statement without adequate protection against injection attacks. This allows an adversary to inject arbitrary SQL commands by crafting a column name that includes syntactic elements such as semicolons or quotes, effectively terminating the intended INSERT operation and chaining additional malicious statements onto it. The vulnerability aligns with CWE-89 Improper Neutralization of Special Elements used in an SQL Command, commonly known as SQL Injection, where user-supplied input is not sufficiently sanitized before being processed by a backend database engine.
The operational impact of this vulnerability is severe, potentially granting unauthorized actors the ability to read sensitive data, modify existing records, or delete critical information accessible to the Snowflake role associated with the application's credentials. Because the exploit relies on chaining additional SQL statements, an attacker could execute complex queries beyond simple data insertion, such as extracting schema details from other tables or altering database structures if permissions allow. This risk is particularly acute in environments where applications handle untrusted input for dynamic table creation or when integrating third-party tools that may not strictly enforce safe naming conventions. The attack vector requires the application to actively pass controlled column names into the write_pandas() method, meaning it does not affect static schema loads but poses a significant threat to dynamic data ingestion workflows.
To mitigate this risk, organizations must ensure that identifier escaping remains enabled in their Snowflake Connector configurations, adhering to secure defaults rather than customizing settings that disable safety features. For environments where the vulnerability has already been exploited or cannot be immediately reconfigured, upgrading to patched versions is essential. The issue was resolved in Snowflake Connector for Python version 4.8.1 and Snowflake Connector for Python Universal Core version 5.2.0. Users are required to manually upgrade these libraries to apply the fix, which enforces proper escaping of column names regardless of configuration settings. Additionally, implementing defense-in-depth strategies such as least-privilege access controls for database roles can limit the blast radius should an injection attempt succeed, reducing the potential impact on overall data integrity and confidentiality in accordance with ATT&CK techniques related to Data Exfiltration or Impact via Database Manipulation.