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

CVE-2026-42237: n8n has SQL Injection in Snowflake and MySQL Nodes

mediumCVSS 4.0 5.3 · 3.1 8.2GHSA-hp3c-vfpm-q4f7

The n8n Snowflake node and the legacy MySQL v1 node insert table names, column names and update keys into SQL without identifier escaping. An earlier fix missed them. If a workflow passes outside input into those fields, an attacker can inject SQL into the connected database. Fixed in n8n 1.123.32, 2.17.4 and 2.18.1.

Published Apr 29, 2026 · Updated May 10, 2026 · Analysis Nov 5, 2026

What an attacker can do

Both nodes build queries by interpolating identifier fields directly: table name, column name and update key. The fix for the earlier advisory GHSA-f3f2-mcxc-pwjx did not cover these two nodes. The MySQL v2 node already escapes identifiers, which shows the gap.

Exploitation needs a workflow where user-controlled input, for example from a form or webhook, reaches one of those identifier fields through an expression. The attacker then injects SQL into the query that n8n sends to the database. The advisory lists data exfiltration, modification and deletion on the downstream database as possible results.

The damage is to the connected Snowflake or MySQL database, not to the n8n host. How far it goes depends on the privileges of the database credential in the node. The 3.1 vector requires low privileges and high attack complexity, which reflects the need for that specific workflow.

Who is affected

n8n on npm below 1.123.32, from 2.0.0 below 2.17.4, and 2.18.0 below 2.18.1. Check workflows that use the Snowflake node or the MySQL node at version 1 with expressions in table, column or update key fields.

npm ls n8n

n8n

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

n8n

Ecosystem
npm
Affected
>= 2.18.0, < 2.18.1
Fixed in
2.18.1
Check
npm ls n8n

n8n

Ecosystem
npm
Affected
>= 2.0.0, < 2.17.4
Fixed in
2.17.4
Check
npm ls n8n

How to fix it

Upgrade to n8n 1.123.32, 2.17.4 or 2.18.1 (or later) for your release line:

npm install -g [email protected]

Short-term steps from the advisory, which do not fully remove the risk:

  • Limit workflow creation and editing to fully trusted users.
  • Move workflows from the legacy MySQL v1 node to MySQL v2, which escapes identifiers.
  • Add n8n-nodes-base.snowflake to NODES_EXCLUDE.
  • Do not pass unvalidated input into table name, column name or update key fields.

How to tell if you were hit

Look at execution data for Snowflake and MySQL v1 node runs where a table, column or update key value holds quotes, semicolons, comment markers or spaces. Check the database query history (Snowflake query history, or the MySQL general log) for statements from the n8n credential that reference unexpected tables or contain extra clauses.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Impact

The fix for GHSA-f3f2-mcxc-pwjx did not cover the Snowflake node or the legacy MySQL v1 node. Both nodes construct SQL queries by directly interpolating user-controlled table names, column names, and update keys into query strings without identifier escaping, enabling SQL injection against the connected database.

Exploitation requires a specific workflow configuration:

  • The Snowflake or MySQL v1 node must be used with user-controlled input passed via expressions (e.g., from a form or webhook) into identifier fields such as table name, column name, or update key.

Successful exploitation could allow data exfiltration, modification, or deletion on the downstream database.

Patches

The issue has been fixed in n8n versions 1.123.32, 2.17.4, and 2.18.1. Users should upgrade to one of these versions or later to remediate the vulnerability.

Workarounds

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

  • Limit workflow creation and editing permissions to fully trusted users only.
  • Migrate workflows from the legacy MySQL v1 node to the MySQL v2 node, which already implements identifier escaping.
  • Disable the Snowflake node by adding n8n-nodes-base.snowflake to the NODES_EXCLUDE environment variable.
  • Avoid passing unvalidated external user input into table name, column name, or update key fields via expressions in the affected nodes.

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

Credited to offensiveee.

Questions

Is the MySQL v2 node affected by CVE-2026-42237?

No. The advisory says MySQL v2 already implements identifier escaping, and it recommends moving off the legacy v1 node.

How does this relate to GHSA-f3f2-mcxc-pwjx?

That earlier fix did not cover the Snowflake and MySQL v1 nodes. This advisory closes that gap.

What can an attacker do?

Read, change or delete data in the connected database, within the privileges of the node's database credential.

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