Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2026-15062

CVE-2026-15062: Snowflake Snowpark Python SDK SQLi Flaw

CVE-2026-15062 is a SQL injection vulnerability in Snowflake Snowpark Python SDK that allows authenticated users to escalate privileges and access unauthorized data. This article covers technical details, affected versions, and mitigation.

Published:

CVE-2026-15062 Overview

CVE-2026-15062 is a set of SQL injection vulnerabilities [CWE-89] in the Snowflake Snowpark Python SDK (snowpark-python) affecting all versions prior to 1.53.0. Authenticated low-privilege users can execute SQL statements outside their authorization scope through three distinct injection paths in the SDK's DataFrame APIs. Successful exploitation enables source database compromise, cross-tenant data exfiltration, and unauthorized reads of Snowflake account data.

Critical Impact

Authenticated attackers can escalate privileges and exfiltrate data across tenant boundaries by injecting SQL through the DataFrameReader.dbapi(), DataFrameWriter location parameters, or DataFrame.to_csv() export paths.

Affected Products

  • Snowflake Snowpark Python SDK (snowpark-python) versions prior to 1.53.0
  • Applications using vulnerable DataFrameReader.dbapi() API
  • Applications using vulnerable DataFrameWriter write methods and DataFrame.to_csv()

Discovery Timeline

  • 2026-07-08 - CVE-2026-15062 published to NVD
  • 2026-07-08 - Last updated in NVD database

Technical Details for CVE-2026-15062

Vulnerability Analysis

CVE-2026-15062 comprises three related SQL injection defects in the Snowpark Python SDK. Each defect allows an authenticated low-privilege caller to smuggle SQL through APIs that construct queries by string interpolation rather than parameterized bindings. The scope-changed impact means an attacker in one tenant context can influence queries executed against other data or accounts.

The first defect resides in DataFrameReader.dbapi(). Source database column names are concatenated into generated SQL without sanitization. An attacker who controls or influences the source schema can embed SQL payloads in column identifiers to escalate privileges.

The second defect affects DataFrameWriter write methods. A specially crafted location parameter redirects a COPY INTO statement to an attacker-supplied source query. This enables reading data the caller is not otherwise authorized to access.

The third defect lies in DataFrame.to_csv(). The normalize_path() sanitizer fails to handle a backslash followed by a single quote (\'). An attacker can escape the quoted path context and inject SQL into the export statement.

Root Cause

The root cause is improper neutralization of special elements used in SQL commands [CWE-89]. The SDK builds SQL strings by concatenating caller-supplied identifiers and paths. The normalize_path() routine additionally fails to account for backslash-escape sequences before single quotes, defeating its sanitizer contract.

Attack Vector

Exploitation requires network access and valid low-privilege credentials to a Snowflake account using the vulnerable SDK. No user interaction is needed. The attacker delivers malicious identifiers or path strings through the SDK APIs, and the injected SQL executes with the privileges of the query pipeline, crossing the intended authorization scope.

The vulnerability manifests through three concrete paths: malicious column names read by DataFrameReader.dbapi(), a crafted location parameter passed to DataFrameWriter write methods that pivots the COPY INTO target, and a \' sequence in an export path passed to DataFrame.to_csv(). See the GitHub Snowpark Python Changelog for release-level technical details.

Detection Methods for CVE-2026-15062

Indicators of Compromise

  • Snowflake query history entries containing unexpected SQL fragments inside column identifiers, COPY INTO source clauses, or export path literals
  • COPY INTO operations targeting external stages or source queries not defined by application logic
  • Export paths passed to DataFrame.to_csv() containing backslash-single-quote sequences (\') or other quote-escape patterns
  • Snowpark client versions below 1.53.0 observed in session client metadata

Detection Strategies

  • Audit Snowflake QUERY_HISTORY and ACCESS_HISTORY for SQL executed by service accounts using Snowpark clients, focusing on statements referencing unusual objects or cross-schema reads
  • Inventory all deployed snowpark-python package versions across data pipelines, notebooks, and CI runners to identify hosts below 1.53.0
  • Inspect application logs for user-supplied values reaching DataFrameReader.dbapi(), DataFrameWriterlocation, or DataFrame.to_csv() path arguments

Monitoring Recommendations

  • Alert on Snowpark-originated queries whose text contains statement terminators (;), comment markers (--, /*), or UNION tokens embedded in identifier positions
  • Baseline COPY INTO source targets per application role and alert on deviations, particularly redirection to external stages
  • Track privilege boundary crossings by correlating Snowpark session role with objects touched during a query

How to Mitigate CVE-2026-15062

Immediate Actions Required

  • Upgrade snowpark-python to version 1.53.0 or later across all environments consuming the SDK
  • Rotate credentials for any Snowflake service account whose queries show signs of injection in QUERY_HISTORY
  • Restrict DataFrameReader.dbapi(), DataFrameWriter, and DataFrame.to_csv() usage to trusted inputs pending upgrade

Patch Information

Snowflake resolved the SQL injection defects in snowpark-python version 1.53.0. Refer to the GitHub Snowpark Python Changelog for the release notes covering the fixes to DataFrameReader.dbapi(), DataFrameWriter location handling, and the normalize_path() sanitizer used by DataFrame.to_csv().

Workarounds

  • Validate and allowlist source database column names before invoking DataFrameReader.dbapi(), rejecting identifiers containing SQL metacharacters
  • Constrain the location parameter passed to DataFrameWriter write methods to a fixed set of application-controlled stages and paths
  • Reject export paths supplied to DataFrame.to_csv() that contain backslash, single-quote, or backslash-single-quote sequences until the SDK is upgraded
  • Apply least-privilege Snowflake roles to Snowpark service accounts to limit blast radius of any successful injection
bash
# Upgrade the Snowpark Python SDK to the patched release
pip install --upgrade "snowpark-python>=1.53.0"

# Verify installed version
python -c "import snowflake.snowpark; print(snowflake.snowpark.__version__)"

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.