/

CVE-2026-15736

Severity:

HIGH RISK

(8.3)

SQL Injection and File Exposure (CWE-89) in Snowflake

CVE-2026-15736

Awaiting Analysis

Vulnerability type

Category:

SQL Injection and Insecure Configuration Handling

CWE:

CWE-73, CWE-89

Impact:

SQL Injection and Arbitrary File Read/Exfiltration

Severity:

HIGH RISK

(8.3)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Snowflake SQLAlchemy before 1.11.0 contains multiple issues where user-controlled input can influence SQL construction and connection configuration in unsafe ways.

In deployments that pass untrusted data into merge operations, table creation helpers, or connection parameters, an attacker could trigger SQL injection or cause arbitrary local files to be read and exfiltrated within the privileges of the application's database and host environment.

Affected context

These vulnerabilities affect applications that integrate with Snowflake via the Snowflake SQLAlchemy library and dynamically build queries or connections from user-controlled data.

Risk is elevated where:

  • HTTP request fields or other external inputs are used to drive dynamic MERGE-based upsert logic
  • User-supplied values reach Snowflake-specific table creation helpers or query-building utilities
  • Connection parameters (including configuration options and integration URLs) can be influenced, directly or indirectly, by untrusted actors

In such contexts, SQL fragments and file-access related configuration are constructed without sufficient isolation from user input.

Exploit preconditions

  • Attack surface: Application endpoints or services that:
  • Accept external input for column identifiers or object keys used in MERGE statements
  • Pass raw strings from clients into Snowflake-specific table creation or query-building APIs
  • Allow user-controlled connection configuration parameters (e.g., via connection strings, dynamic tenants, or runtime overrides)
  • Required access: Ability to send crafted requests to the application or system that uses the vulnerable library; no direct database access is required.
  • Trigger point:
  • For SQL injection: when the application invokes MERGE or DDL construction routines that interpolate attacker-controlled identifiers or literals into SQL.
  • For file exposure: when the application initializes a Snowflake connection using parameters partly controlled by the attacker.
  • Why exploitation is possible: The library:
  • Treats user-controlled identifiers as trusted, allowing them to be embedded into MERGE operations without robust quoting or validation.
  • Renders certain bound parameters in a way that breaks the intended parameterization boundary for table creation queries.
  • Forwards configuration parameters in a manner that lets attackers steer the library to read local files and send their contents to remote endpoints.

Why this happens

At its core, the issue stems from unsafe mixing of untrusted data with control-plane elements of SQL and connection configuration.

For the SQL injection aspects (CWE-89), attacker-controlled values are used as column identifiers or are embedded in Snowflake-specific DDL queries without consistently enforcing parameterization or strict identifier validation, causing data to cross the boundary from "data" into executable SQL syntax.

For the file exposure aspect (CWE-73), connection configuration parameters derived from user input are forwarded into lower-level mechanisms that can reference local files or external locations, allowing an attacker to influence which files are read and where their contents are sent.

These patterns reflect a breakdown in input trust modeling and in the abstraction that query builders and connection helpers should provide between user-controlled data and sensitive interpreter or filesystem behavior.

Potential impact

  • Attackers may read or enumerate data accessible to the application's Snowflake role through crafted MERGE inputs.
  • Attackers could alter, corrupt, or overwrite data within the scope of the affected MERGE statement or related queries.
  • Attackers may perform SQL injection against Snowflake-specific table creation or DDL flows, potentially exfiltrating arbitrary queryable data.
  • Attackers could cause the application to read sensitive local files (e.g., configuration files, keys, tokens) and transmit their contents to attacker-controlled endpoints.
  • Combined with other weaknesses, these issues can support broader lateral movement or escalation within the data environment.

General mitigation guidance

Effective mitigation focuses on tightening the boundary between untrusted input, SQL construction, and connection configuration.

Pattern-oriented defenses include:

  • Treating column names, table names, and other identifiers as trusted configuration, not as user inputs; introduce explicit allow-lists or mapping layers instead of directly using client-supplied keys.
  • Using strong parameterization for all values that belong in SQL expressions and avoiding ad hoc string concatenation in query builders.
  • Normalizing and validating identifier-like fields against strict patterns (e.g., limited character sets, length constraints, and pre-declared schemas) before using them in query construction.
  • Separating connection configuration from user-controlled data; avoid designs where tenants or users can directly influence connection strings, file references, or integration endpoints.
  • Applying least-privilege for database roles and filesystem access so that, even if a query or file path is misused, the blast radius is constrained.

How teams detect issues like this

Detection can combine code-centric and behavior-centric approaches:

  • Static analysis: Define rules that flag dynamic SQL construction using user input for identifiers, MERGE clauses, or Snowflake-specific helpers; highlight any concatenation of request fields into SQL strings.
  • Code review: Examine data-access layers for:
  • Direct use of client-provided keys as column names or merge criteria
  • Custom DDL or table creation utilities that interpolate raw strings into Snowflake SQL
  • Connection factory functions that accept or build connection parameters from untrusted sources
  • Runtime monitoring: Use database activity monitoring and application logging to detect anomalous MERGE patterns, unexpected DDL executions, or unusual external endpoints being used by the Snowflake connector.
  • Policy enforcement: Establish organizational guidelines (and CI checks) that prohibit using user input for identifiers or connection parameters without explicit validation and mapping.

Sources

SourceLink
github.comgithub.com/snowflakedb/snowflake-sqlalchemy/releases

Frequently asked

questions

Yes, in many deployments. If an application exposes endpoints that feed user input into MERGE operations, table creation logic, or connection configuration, an external attacker can potentially exploit these issues via crafted requests.

No. The attacker typically only needs access to the application or service that uses the vulnerable Snowflake SQLAlchemy library. Exploits run within the privileges of the application's existing database role and its host environment.

The safest pattern is to ensure that untrusted input never directly controls SQL identifiers or connection parameters. Introduce explicit mapping layers for column names, rely on parameterized queries for all values, and centralize connection configuration so it is static or tightly validated, rather than user-driven.

Future designs should adopt a strict separation between data and control: treat all external inputs as data only, enforce strong validation and allow-lists for any values that might influence SQL structure or configuration, and subject data-access infrastructure and ORM customizations to focused security review and automated checks.

Find out what's already
exploitable in your codebase.