NewApp Monitoring is liveSign up free
AgentbeamBeta
AI agent vulnerability · n8n

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

mediumCVSS 4.0 5.3

The n8n Snowflake node's Execute Query operation pasted expression values straight into the SQL string, so a query built from untrusted data could be hijacked by SQL injection. It needs a workflow that already puts external data in a raw query. Fixed in n8n 1.123.67, 2.31.5 and 2.32.1, which add a "Query Parameters" field for bound values.

Published Jul 22, 2026 · Analysis Oct 25, 2026

What an attacker can do

In the Snowflake node's executeQuery operation, an expression such as a webhook field or an upstream node's output was substituted into the query text. Nothing escaped it or bound it as a parameter. If the value came from an outside party, they could add SQL of their own. The query then ran with the rights of the Snowflake credential in the node.

The advisory is clear about the precondition: a workflow author must have embedded untrusted expression data directly in a raw SQL query. A typical case is a webhook-triggered workflow that takes a customer name from the request body and writes it into a WHERE clause. The attacker needs no n8n account in that case, only the ability to reach the webhook or trigger that feeds the node. The CVSS vector lists low privileges and a present attack requirement, and rates the effect on the downstream Snowflake system as high for confidentiality and integrity.

In practice an attacker could read tables the credential can read, or change data it can write.

Who is affected

The npm package n8n below 1.123.67 on the 1.x line, >= 2.0.0-rc.0, < 2.31.5, and 2.32.0. Only workflows that use the Snowflake node's executeQuery operation with expressions inside the raw SQL are exposed.

npm ls n8n

Then search your workflows for Snowflake nodes set to Execute Query that contain {{ ... }} expressions in the query field.

n8n

Ecosystem
npm
Affected
< 1.123.67
Fixed in
1.123.67
Check
npm ls n8n

n8n

Ecosystem
npm
Affected
>= 2.32.0, < 2.32.1
Fixed in
2.32.1
Check
npm ls n8n

n8n

Ecosystem
npm
Affected
>= 2.0.0-rc.0, < 2.31.5
Fixed in
2.31.5
Check
npm ls n8n

How to fix it

Upgrade n8n to 1.123.67, 2.31.5 or 2.32.1, or later, matching your release line. The fix adds an optional "Query Parameters" field. Rewrite affected queries to use positional placeholders and put the values in that field, so they are bound and not interpolated. Upgrading alone does not rewrite old workflows.

Temporary measures from the advisory, which it says do not fully remove the risk:

  • Limit workflow creation and editing to fully trusted users.
  • Audit Snowflake executeQuery workflows and remove expressions that resolve to externally controlled data from the raw SQL.
  • Limit network access to webhook or trigger endpoints that feed those nodes.

How to tell if you were hit

Review the Snowflake query history for your n8n service account. Look for statements that contain unexpected extra clauses, UNION, comments, or tables the workflow never touches, and for failed queries with syntax errors that line up with requests to a webhook. Compare executed SQL with what the workflow is meant to produce.

In n8n, check execution data of Snowflake executeQuery nodes for inputs holding quotes, semicolons or SQL keywords. Also check the webhook's access logs for the same requests.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Impact

The n8n Snowflake node's Execute Query operation interpolated expression values directly into the SQL string, making queries built with untrusted data susceptible to SQL injection.

Exploitation requires that a workflow author has already embedded untrusted expression data directly in a raw SQL query.

Patches

The issue has been fixed in n8n versions 1.123.67, 2.31.5, and 2.32.1. Users should upgrade to one of these versions or later to remediate the vulnerability. The fix introduces an optional "Query Parameters" field that allows values to be bound via positional placeholders rather than interpolated into the query string.

Workarounds

If upgrading is not immediately possible, administrators should consider the following temporary mitigations:

  • Restrict workflow creation and editing permissions to fully trusted users only.
  • Audit existing workflows that use the Snowflake executeQuery operation and ensure no expression resolving to externally-controlled data is embedded directly in a raw SQL query string.
  • Restrict network access to any webhook or trigger endpoints that feed data into Snowflake executeQuery nodes.

These workarounds do not fully remediate the risk and should only be used as short-term mitigation measures.

Questions

Does upgrading fix my existing Snowflake workflows?

Not by itself. The fix adds a "Query Parameters" field for positional placeholders. You must change queries that embed expressions so they use it.

Is this exploitable without a workflow mistake?

No. The advisory says a workflow author must have already placed untrusted expression data directly in a raw SQL query.

Which n8n versions are fixed?

1.123.67, 2.31.5 and 2.32.1, or any later release. Use the one for your release line.

Does this advisory have a CVE?

None is assigned in the advisory. It is tracked as GHSA-652q-gvq3-74qv.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology

More n8n vulnerabilities

All n8n entries