CVE-2025-24793
📋 TL;DR
The Snowflake Connector for Python contains a SQL injection vulnerability in the snowflake.connector.pandas_tools module. This allows attackers to execute arbitrary SQL commands on Snowflake databases when using vulnerable functions. Applications using versions 2.2.5 through 3.13.0 of the connector are affected.
💻 Affected Systems
- Snowflake Connector for Python
📦 What is this software?
⚠️ Risk & Real-World Impact
Worst Case
Full database compromise including data theft, data manipulation, privilege escalation, and potential lateral movement within Snowflake environment
Likely Case
Data exfiltration from accessible tables, data corruption, or unauthorized query execution
If Mitigated
Limited to read-only operations on accessible data if proper database permissions are configured
🎯 Exploit Status
Requires application to pass user-controlled input to vulnerable pandas_tools functions
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 3.13.1
Vendor Advisory: https://github.com/snowflakedb/snowflake-connector-python/security/advisories/GHSA-2vpq-fh52-j3wv
Restart Required: No
Instructions:
1. Update snowflake-connector-python package using pip: pip install --upgrade snowflake-connector-python==3.13.1
2. Verify no applications are pinned to vulnerable versions
3. Test application functionality after update
🔧 Temporary Workarounds
Input Validation and Parameterization
allImplement strict input validation and use parameterized queries instead of string concatenation
🧯 If You Can't Patch
- Implement strict input validation and sanitization for all user inputs passed to pandas_tools functions
- Apply principle of least privilege to Snowflake database users and restrict permissions
🔍 How to Verify
Check if Vulnerable:
Check installed version: pip show snowflake-connector-python | grep Version
Check Version:
python -c "import snowflake.connector; print(snowflake.connector.__version__)"
Verify Fix Applied:
Confirm version is 3.13.1 or higher: pip list | grep snowflake-connector-python
📡 Detection & Monitoring
Log Indicators:
- Unusual SQL queries from application users
- Multiple failed query attempts with SQL syntax errors
- Queries containing unexpected SQL keywords or special characters
Network Indicators:
- Unusually large data transfers from Snowflake database
- Multiple rapid SQL queries from single source
SIEM Query:
source="snowflake_logs" AND (query CONTAINS "UNION" OR query CONTAINS "SELECT *" OR query CONTAINS "DROP" OR query CONTAINS "INSERT") AND NOT query MATCHES expected_pattern