CVE-2026-13752
Executive Summary
CVE-2026-13752 is a high-severity SQL injection vulnerability in Snowflake CLI versions prior to 3.19. The flaw arises from improper neutralization of parameters, allowing an attacker to inject and execute arbitrary SQL commands within the context of the user’s Snowflake session. Exploitation requires user interaction (e.g., social engineering, malicious repository configuration, or compromised automation) to supply crafted values to vulnerable command paths. The impact is limited by the privileges of the active session, but successful exploitation can lead to unauthorized data access, modification, or deletion. The vendor has released a fix in version 3.19, and users must manually upgrade.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
This vulnerability affects the Snowflake CLI, a command-line tool for interacting with Snowflake data warehouses. It is distributed via official channels (e.g., Snowflake’s website, package managers). Users should verify the integrity of their CLI installation and ensure they are using a trusted source. The vulnerability does not directly impact the Snowflake service itself but rather the client-side tool used to manage it.
CVSS Breakdown & Threat Level
- CVSS Score: 6.0 (Medium)
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N
- Attack Vector (AV): Network – The attack can be launched remotely.
- Attack Complexity (AC): Low – No special conditions are required.
- Privileges Required (PR): None – The attacker does not need prior authentication.
- User Interaction (UI): Required – The victim must execute a crafted command or open a malicious file.
- Scope (S): Unchanged – The vulnerability does not affect other components.
- Confidentiality (C): High – Sensitive data can be exfiltrated.
- Integrity (I): High – Data can be modified or deleted.
- Availability (A): None – The vulnerability does not cause denial of service.
Threat Level: Medium. While the CVSS score is 6.0, the requirement for user interaction reduces the likelihood of widespread automated exploitation. However, targeted attacks via social engineering or compromised CI/CD pipelines are plausible.
Deep Dive & Mechanics
The vulnerability resides in the parameter handling logic of Snowflake CLI. When processing command-line arguments or configuration files, the CLI fails to properly sanitize or escape user-supplied values before embedding them into SQL queries. An attacker can craft a value that, when passed to a vulnerable parameter (e.g., a table name, column name, or filter condition), breaks out of the intended SQL context and injects arbitrary SQL statements.
For example, a command like:
snowsql -o table_name="my_table; DROP TABLE sensitive_data; --"
could result in the CLI executing:
SELECT * FROM my_table; DROP TABLE sensitive_data; --;
The injection occurs because the CLI constructs SQL queries using string concatenation or interpolation without proper parameterization. The fix in version 3.19 likely involves using prepared statements or parameterized queries to separate SQL logic from data.
Vulnerable vs. Patched Code
Vulnerable Code (Conceptual):
# Vulnerable: Direct string interpolation
query = f"SELECT * FROM {table_name}"
cursor.execute(query)
Patched Code (Conceptual):
# Patched: Parameterized query
query = "SELECT * FROM ?"
cursor.execute(query, (table_name,))
The patched version ensures that user input is treated as data, not executable SQL.
Exploitation & Lab Setup
Red Team (Attacker)
Prerequisites:
- Snowflake CLI version < 3.19 installed on the target system.
- Ability to supply crafted input to the CLI (e.g., via social engineering, malicious config file, or compromised automation).
Exploitation Steps:
- Identify Vulnerable Parameters: Look for CLI options that accept user-controlled strings (e.g.,
-o,--option, or config file values). - Craft Payload: Create a value that includes SQL injection syntax. Example:
'; SELECT * FROM SNOWFLAKE.ACCOUNT_USAGE.QUERY_HISTORY; -- - Deliver Payload: Use social engineering (e.g., phishing email with a malicious command), a compromised repository configuration, or a CI/CD pipeline that passes external values to the CLI.
- Execute: The victim runs the crafted command, triggering the injection.
Example Command:
snowsql -o database_name="test_db'; DROP TABLE sensitive_data; --"
Expected Outcome: The attacker can execute arbitrary SQL within the context of the victim’s Snowflake session, potentially exfiltrating or modifying data.
Blue Team (Defender)
Detection:
- Monitor for unusual Snowflake CLI commands, especially those containing SQL keywords (e.g.,
DROP,SELECT,INSERT) in parameter values. - Audit Snowflake query history for unexpected SQL statements originating from CLI sessions.
- Use endpoint detection and response (EDR) to flag processes named
snowsqlorsnowflakewith suspicious arguments.
Prevention:
- Immediately upgrade to Snowflake CLI version 3.19 or later.
- Restrict CLI usage to trusted users and systems.
- Implement input validation and sanitization for any external data fed into the CLI.
- Use network segmentation to limit CLI access to Snowflake.
Indicators of Compromise (IOCs)
- File Hashes (SHA256): (None available – users should verify their CLI binary against official checksums)
- Network Indicators:
- Unusual SQL queries in Snowflake query history (e.g.,
DROP,ALTER,GRANTfrom CLI sessions). - Connections to Snowflake from unexpected IP addresses or user agents.
- Unusual SQL queries in Snowflake query history (e.g.,
- Process Indicators:
snowsqlorsnowflakeprocesses with arguments containing SQL keywords.- Child processes spawned by the CLI (e.g.,
cmd.exe,/bin/sh).
- Log Indicators:
- Snowflake audit logs showing
QUERY_HISTORYentries with suspicious SQL syntax. - System logs (e.g., Sysmon Event ID 1) recording CLI execution with unusual parameters.
- Snowflake audit logs showing
Detection Engineering
YARA Rule
rule CVE_2026_13752_Snowflake_CLI_SQLi {
meta:
description = "Detects potential SQL injection attempts against Snowflake CLI"
author = "Valters IT"
date = "2025-04-10"
cve = "CVE-2026-13752"
strings:
$s1 = "snowsql" nocase
$s2 = "snowflake" nocase
$sql1 = /['\"]\s*;\s*(SELECT|INSERT|UPDATE|DELETE|DROP|ALTER|CREATE|EXEC|EXECUTE)/i
$sql2 = /--\s*$/m
condition:
($s1 or $s2) and ($sql1 or $sql2)
}
Sigma Rule
title: CVE-2026-13752 - Snowflake CLI SQL Injection Attempt
id: 8a9b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d
status: experimental
description: Detects command-line arguments to Snowflake CLI containing SQL injection patterns
author: Valters IT
date: 2025-04-10
logsource:
category: process_creation
product: windows
detection:
selection:
Image|endswith:
- '\snowsql.exe'
- '\snowflake.exe'
CommandLine|contains:
- '; SELECT'
- '; INSERT'
- '; UPDATE'
- '; DELETE'
- '; DROP'
- '; ALTER'
- '; CREATE'
- '; EXEC'
- '--'
condition: selection
falsepositives:
- Legitimate use of SQL commands in CLI parameters (rare)
level: high
Suricata Rule
alert tcp $HOME_NET any -> $EXTERNAL_NET 443 (msg:"CVE-2026-13752 - Snowflake CLI SQL Injection via HTTPS"; flow:to_server,established; content:"snowsql"; nocase; content:"; SELECT"; nocase; distance:0; within:100; classtype:attempted-admin; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Upgrade: Update Snowflake CLI to version 3.19 or later. Run:
# For macOS/Linux curl -O https://sfc-repo.snowflakecomputing.com/snowsql/bootstrap/1.2/linux_x86_64/snowsql-3.19-linux_x86_64.bash bash snowsql-3.19-linux_x86_64.bash # For Windows # Download and run the installer from Snowflake's website - Verify Installation: Confirm the version:
snowsql --version - Audit Usage: Review recent CLI usage for signs of exploitation. Check Snowflake query history for unauthorized SQL.
Long-Term Mitigations:
- Implement strict input validation for any data passed to the CLI.
- Use parameterized queries in any custom scripts that interact with Snowflake.
- Enforce least privilege for Snowflake sessions (e.g., read-only roles where possible).
- Monitor for anomalous CLI behavior using the provided detection rules.
Workarounds (if upgrade is not immediately possible):
- Avoid using the CLI with untrusted input.
- Restrict CLI execution to trusted users and systems.
- Use a web proxy or firewall to inspect CLI traffic for SQL injection patterns.
Valters IT