CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



GHSA-652Q-GVQ3-74QV

GHSA-652q-gvq3-74qv: SQL Injection in n8n Snowflake Node via Unparameterized Expression Interpolation

Alon Barad
Alon Barad
Software Engineer

Jul 23, 2026·7 min read·1 visit

Executive Summary (TL;DR)

The n8n Snowflake node allows SQL Injection due to direct text interpolation of visual expressions. Upgrading to 1.123.67, 2.31.5, or 2.32.1 and migrating to 'Query Parameters' parameterization secures the application.

A SQL Injection vulnerability exists in the n8n Snowflake node's executeQuery operation. The vulnerability is caused by improper neutralization of expressions interpolated directly into database query strings. When raw Snowflake queries are built using untrusted external data without parameterization, an attacker can execute arbitrary SQL commands on the subsequent Snowflake database instance.

Vulnerability Overview

The Snowflake node in the n8n visual workflow automation platform provides an executeQuery operation designed to run raw SQL statements against a connected Snowflake database instance. Visual workflows in n8n facilitate data movement and manipulation by linking disparate nodes. To pass dynamic values between these nodes, n8n utilizes a double curly brace syntax ({{ ... }}) that evaluates JavaScript-like expressions at runtime.

In vulnerable versions of n8n, when the Snowflake node executes a query containing these expression blocks, the execution engine evaluates the expressions and directly interpolates the resulting string values into the SQL command text. This pattern acts as a literal search-and-replace mechanism prior to query dispatch. The compiled query is then transmitted directly to the database driver for execution.

This behavior exposes a significant attack surface if a workflow author constructs a query containing untrusted input, such as query parameters from an incoming webhook or fields from a public API. Because the user input is not neutralized or parsed structurally, an attacker can break out of the intended query context. This shifts the execution logic and permits unauthorized interactions with the target database.

Root Cause Analysis

The fundamental cause of this vulnerability lies in the lack of separation between the code logic (the SQL structure) and the data payload (the expression evaluation values). In secure database interactions, user-supplied inputs are treated as parameters and are bound separately by the database driver. The database driver coordinates with the engine to ensure parameters are treated exclusively as literal values, never as executable code.

In vulnerable versions of the Snowflake node, the application fails to utilize parameter binding for the executeQuery operation. Instead, the node's backend runtime extracts the raw string representing the SQL query, evaluates the internal n8n template syntax, and creates a single monolithic query string. This behavior aligns directly with CWE-89 (SQL Injection).

For the vulnerability to be exploitable, specific conditions must be met within the deployed workflow. A workflow developer must configure a Snowflake node to use the executeQuery operation and manually embed one or more upstream expressions that contain user-controlled fields. If these expressions are placed within single-quoted string literals or raw numeric positions in the SQL template without prior sanitization, the injection point becomes active.

Code Analysis and Patch Walkthrough

To analyze the vulnerability, we examine the logical transition from unparameterized string concatenation to parameter-bound query execution. In vulnerable implementations, the query execution engine of the Snowflake node processed queries through a pattern resembling the following conceptual structure:

// Vulnerable execution pattern
async function executeQuery(nodeData) {
  // Expressions are resolved to plain strings beforehand
  const rawSqlString = this.getNodeParameter('sqlQuery', itemIndex);
  
  // The raw string is sent directly to the driver
  const connection = getSnowflakeConnection();
  return new Promise((resolve, reject) => {
    connection.execute({
      sqlText: rawSqlString,
      complete: (err, stmt, rows) => {
        if (err) return reject(err);
        resolve(rows);
      }
    });
  });
}

The patch addresses this structural vulnerability by introducing support for query parameters. Instead of forcing raw text interpolation, the database driver's query parameterization feature is exposed to the user interface. The updated code execution pattern utilizes positional placeholders (such as ?) and maps the user-provided expressions to an array of parameters:

// Patched execution pattern
async function executeQuery(nodeData) {
  const rawSqlString = this.getNodeParameter('sqlQuery', itemIndex);
  // Optional helper retrieves designated parameters as an array
  const queryParameters = this.getNodeParameter('queryParameters', itemIndex, []) as any[];
 
  const connection = getSnowflakeConnection();
  return new Promise((resolve, reject) => {
    const executionOptions: any = {
      sqlText: rawSqlString,
      complete: (err, stmt, rows) => {
        if (err) return reject(err);
        resolve(rows);
      }
    };
 
    // If parameters are provided, bind them securely
    if (queryParameters && queryParameters.length > 0) {
      executionOptions.binds = queryParameters;
    }
 
    connection.execute(executionOptions);
  });
}

This remediation ensures that any value supplied via the binds array is correctly handled by the Snowflake database client library. The driver wraps parameters during communication with the Snowflake API, rendering injected SQL metacharacters inert. However, security teams must note that this fix is opt-in for existing workflows; developers must manually rewrite their raw SQL strings to use the positional placeholders.

Exploitation Methodology

The exploitation of this vulnerability depends on the configuration of the workflow. The attack vector relies on an external entity being able to control the data fed into the interpolated expressions. The following diagram illustrates the lifecycle of an exploitation attempt from the initial HTTP request to the final database impact:

Consider an administrative lookup query structured as: SELECT * FROM accounts WHERE domain = '{{ $json.body.domain }}'. Under normal usage, a request containing {"domain": "example.com"} generates the query SELECT * FROM accounts WHERE domain = 'example.com'. This returns the expected single row.

To exploit this query, an attacker submits a payload containing a single-quote delimiter followed by structural SQL commands. Sending the string victim.com' UNION SELECT CURRENT_USER(), CURRENT_ROLE(), NULL -- alters the structural meaning of the query. The database interpreter processes the command as two separate SELECT statements merged via a UNION operator. The -- sequence comments out the trailing single quote, preventing syntax errors. This returns sensitive environment credentials and bypasses the application's access constraints.

Impact Assessment

The primary impact of this vulnerability is the complete compromise of the logical security boundary for the connected Snowflake database. The level of compromise corresponds directly to the privileges of the database credentials stored in n8n. If the connection is configured with administrative privileges (such as ACCOUNTADMIN or SYSADMIN), the attacker gains the ability to create, modify, or delete database objects, read sensitive tables, and potentially pivot to other cloud storage areas associated with the Snowflake account.

The vulnerability is classified with a CVSS v4 score of 5.3 (Medium). This reflects the specific attack requirement (AT:P), which dictates that the vulnerability is not exploitable out of the box unless a workflow developer creates a flawed design. The impact on the n8n host itself is categorized as Low (VC:L/VI:L/VA:N) because the SQL injection executes on the remote database rather than on the local server running n8n. However, the subsequent system impact is High (SC:H/SI:H) due to the direct potential for data theft and modification on the Snowflake target.

Currently, there are no records of active exploitation in the wild, nor is this vulnerability tracked in CISA's Known Exploited Vulnerabilities (KEV) catalog. It represents a typical configuration-dependent vulnerability where the tool provides powerful capabilities but requires manual, secure engineering patterns to prevent exploitation.

Remediation and Detection Guidance

To fully address this vulnerability, organizations must apply a two-step remediation strategy involving a platform upgrade followed by manual workflow refactoring.

First, upgrade the n8n application to one of the following secure releases or later: 1.123.67 (for the 1.x release track), 2.31.5 (for 2.x releases), or 2.32.1 (for subsequent releases). Upgrading ensures that the Snowflake node supports the optional Query Parameters binding feature.

Second, security administrators and workflow developers must audit and refactor existing Snowflake configurations. Simply upgrading the platform does not secure workflows that continue to use direct text-replacement expressions. For every node executing a raw query, developers must replace expressions like {{ $json.variable }} with a positional ? placeholder and register the corresponding expression within the newly available 'Query Parameters' option list.

To assist with identifying vulnerable workflows on self-hosted installations, administrators can query the underlying n8n metadata store. For instances backed by PostgreSQL, running the following database query will identify active workflows containing Snowflake nodes running raw queries:

SELECT id, name, active 
FROM workflow_entity 
WHERE active = true 
  AND json::text LIKE '%"nodeType": "n8n-nodes-base.snowflake"%' 
  AND json::text LIKE '%"operation": "executeQuery"%';

Administrators should inspect each returned workflow's definition to verify whether expressions are being interpolated safely using parameters or unsafely via string manipulation.

Official Patches

n8nn8n Release v1.123.67
n8nn8n Release v2.31.5
n8nn8n Release v2.32.1

Technical Appendix

CVSS Score
5.3/ 10
CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:L/VI:L/VA:N/SC:H/SI:H/SA:N

Affected Systems

n8n self-hosted instances using Snowflake integration node

Affected Versions Detail

Product
Affected Versions
Fixed Version
n8n
n8n
< 1.123.671.123.67
n8n
n8n
>= 2.0.0-rc.0, < 2.31.52.31.5
n8n
n8n
>= 2.32.0, < 2.32.12.32.1
AttributeDetail
CWE IDCWE-89
Attack VectorNetwork
CVSS Score5.3
EPSS ScoreN/A
Exploit Statusnone
CISA KEV StatusNot Listed

MITRE ATT&CK Mapping

T1190Exploit Public-Facing Application
Initial Access
T1059Command and Scripting Interpreter
Execution
T1565Data Alteration
Impact
T1020Automated Exfiltration
Exfiltration
CWE-89
Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')

The software constructs an SQL command using input from an upstream component, but fails to neutralize or improperly neutralizes elements that could alter the intended SQL command logic.

Known Exploits & Detection

GitHub Security AdvisoryAdvisory text outlining the conceptual vulnerability model

Vulnerability Timeline

GitHub Security Advisory published
2026-07-22
n8n releases patched versions
2026-07-22

References & Sources

  • [1]GitHub Security Advisory GHSA-652q-gvq3-74qv
  • [2]Global GitHub Advisory Database Entry
  • [3]n8n Release 1.123.67
  • [4]n8n Release 2.31.5
  • [5]n8n Release 2.32.1

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•12 minutes ago•GHSA-9CMH-XCQM-5HQR
5.8

GHSA-9cmh-xcqm-5hqr: Cross-Tenant Module-Cache Poisoning in n8n JS Task Runner

A module-cache poisoning vulnerability exists in the n8n JavaScript task runner. In multi-tenant or multi-user n8n deployments, custom code executed inside Code nodes shares a single Node.js process and memory space. If custom module loading is enabled via configuration, an authorized user can dynamically patch (monkey-patch) globally cached modules. Subsequent executions of workflows by other tenants or users that load the same module will receive the poisoned reference, resulting in cross-tenant data exposure, credential hijacking, or integrity compromise.

Alon Barad
Alon Barad
1 views•6 min read
•about 1 hour ago•GHSA-JQWR-VX3P-R266
5.8

GHSA-JQWR-VX3P-R266: SQL Injection in n8n PostgresTrigger Node

An authenticated SQL injection vulnerability (CWE-89) in n8n's PostgresTrigger node allows users with workflow creation or modification privileges to inject arbitrary SQL statements. Because n8n dynamically constructs database administration and event subscription queries by directly interpolating user-controlled parameters—such as PostgreSQL channel, function, and trigger names—without sanitization or identifier quoting, attackers can execute arbitrary queries within the context of the configured database credentials, potentially leading to unauthorized data exposure, system tampering, or remote code execution.

Alon Barad
Alon Barad
2 views•7 min read
•about 7 hours ago•CVE-2024-7708
7.5

CVE-2024-7708: Resource Exhaustion via HTTP Connection Buffer Leak in Eclipse Jetty

Eclipse Jetty is subject to an uncontrolled resource consumption vulnerability in its HTTP connection handling component. When processing certain HTTP request sequences, such as those invoking the Expect: 100-Continue handshake under specific network constraints, the server fails to return allocated buffers to its central pool. Over time, this leads to buffer pool exhaustion and a complete denial of service via memory starvation.

Amit Schendel
Amit Schendel
6 views•6 min read
•about 8 hours ago•CVE-2026-65595
8.9

CVE-2026-65595: Privilege Escalation and Remote Code Execution in n8n Token Exchange Module

CVE-2026-65595 is a high-severity privilege escalation vulnerability in the Token Exchange module of the n8n visual workflow automation platform. Due to an validation omission, the system unconditionally maps all Public API scopes to session tokens exchanged through trusted Identity Providers, entirely bypassing user-specific role checks.

Alon Barad
Alon Barad
8 views•6 min read
•about 9 hours ago•CVE-2026-65597
8.2

CVE-2026-65597: DOM-based Cross-Site Scripting (XSS) in n8n HTML Preview

A critical DOM-based Cross-Site Scripting (XSS) vulnerability exists in n8n's workflow editor HTML preview component. By failing to include a sandbox attribute on the iframe used to display node execution output, n8n allowed rendered execution outputs to run arbitrary JavaScript within the same-origin context of the editor parent window. This vulnerability can be exploited by an attacker with low-privileged ('global:member') access to hijack an authenticated administrator's session and perform unauthorized API actions.

Alon Barad
Alon Barad
5 views•5 min read
•about 10 hours ago•CVE-2026-65592
8.4

CVE-2026-65592: Stored DOM-based Cross-Site Scripting via cachedResultUrl in n8n

A Stored DOM-based Cross-Site Scripting (XSS) vulnerability exists within the frontend Resource Locator component of n8n. The flaw stems from insecure usage of window.open() where the application evaluates the workflow-persisted parameter 'cachedResultUrl' without verifying its protocol scheme. Authenticated attackers with permissions to create or edit workflows can insert a 'javascript:' URI payload, leading to arbitrary code execution in the victim's browser context upon interaction.

Alon Barad
Alon Barad
7 views•5 min read