n8n: MySQL v1 Node executeQuery Operation Allows SQL Injection via Unparameterized Expression Interpolation (CVE-2026-59257)
The n8n MySQL v1 node's executeQuery operation is vulnerable to SQL injection due to unparameterized expression interpolation. This allows attacker-controlled input to be directly substituted into SQL queries, potentially leading to unauthorized data disclosure, modification, or deletion. The vulnerability affects workflows using the MySQL v1 node with executeQuery and externally reachable triggers. It has been fixed in n8n versions 1.123.61, 2.27.4, and 2.28.1. Temporary mitigations include disabling the MySQL node, restricting access to affected workflows, requiring authentication on webhook endpoints, or migrating to the MySQL v2 node, which uses parameterized queries.
AI Analysis
Technical Summary
The legacy MySQL v1 node in n8n has an SQL injection vulnerability (CVE-2026-59257) in its executeQuery operation. This occurs because the node substitutes evaluated expressions enclosed in {{ ... }} directly into raw SQL strings without parameterization. If these expressions incorporate attacker-controlled input via externally reachable triggers such as webhook nodes, an attacker can execute arbitrary SQL commands with the privileges of the configured MySQL credentials. This can lead to unauthorized disclosure, modification, or deletion of data in the connected database. The MySQL v2 node is not affected. The vulnerability is fixed in n8n versions 1.123.61, 2.27.4, and 2.28.1. Until upgrading, administrators can disable the MySQL node, restrict access to vulnerable workflows, require authentication on webhook endpoints, or migrate workflows to the MySQL v2 node. These mitigations do not fully eliminate the risk and should be considered temporary.
Potential Impact
Successful exploitation allows arbitrary SQL execution with the privileges of the configured MySQL credentials. This enables unauthorized disclosure, modification, or deletion of data in the downstream database. The vulnerability affects only workflows using the MySQL v1 node's executeQuery operation with expression interpolation and externally reachable triggers.
Mitigation Recommendations
A fix is available in n8n versions 1.123.61, 2.27.4, and 2.28.1; users should upgrade to one of these versions or later. If upgrading immediately is not possible, temporary mitigations include disabling the MySQL node by adding 'n8n-nodes-base.mySql' to the NODES_EXCLUDE environment variable, auditing and restricting access to workflows using the MySQL v1 executeQuery operation, ensuring webhook endpoints require authentication, and migrating affected workflows to the MySQL v2 node which uses parameterized queries. These workarounds do not fully remediate the risk and should only be used short-term.
n8n: MySQL v1 Node executeQuery Operation Allows SQL Injection via Unparameterized Expression Interpolation (CVE-2026-59257)
Description
The n8n MySQL v1 node's executeQuery operation is vulnerable to SQL injection due to unparameterized expression interpolation. This allows attacker-controlled input to be directly substituted into SQL queries, potentially leading to unauthorized data disclosure, modification, or deletion. The vulnerability affects workflows using the MySQL v1 node with executeQuery and externally reachable triggers. It has been fixed in n8n versions 1.123.61, 2.27.4, and 2.28.1. Temporary mitigations include disabling the MySQL node, restricting access to affected workflows, requiring authentication on webhook endpoints, or migrating to the MySQL v2 node, which uses parameterized queries.
CVSS v4.0
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The legacy MySQL v1 node in n8n has an SQL injection vulnerability (CVE-2026-59257) in its executeQuery operation. This occurs because the node substitutes evaluated expressions enclosed in {{ ... }} directly into raw SQL strings without parameterization. If these expressions incorporate attacker-controlled input via externally reachable triggers such as webhook nodes, an attacker can execute arbitrary SQL commands with the privileges of the configured MySQL credentials. This can lead to unauthorized disclosure, modification, or deletion of data in the connected database. The MySQL v2 node is not affected. The vulnerability is fixed in n8n versions 1.123.61, 2.27.4, and 2.28.1. Until upgrading, administrators can disable the MySQL node, restrict access to vulnerable workflows, require authentication on webhook endpoints, or migrate workflows to the MySQL v2 node. These mitigations do not fully eliminate the risk and should be considered temporary.
Potential Impact
Successful exploitation allows arbitrary SQL execution with the privileges of the configured MySQL credentials. This enables unauthorized disclosure, modification, or deletion of data in the downstream database. The vulnerability affects only workflows using the MySQL v1 node's executeQuery operation with expression interpolation and externally reachable triggers.
Mitigation Recommendations
A fix is available in n8n versions 1.123.61, 2.27.4, and 2.28.1; users should upgrade to one of these versions or later. If upgrading immediately is not possible, temporary mitigations include disabling the MySQL node by adding 'n8n-nodes-base.mySql' to the NODES_EXCLUDE environment variable, auditing and restricting access to workflows using the MySQL v1 executeQuery operation, ensuring webhook endpoints require authentication, and migrating affected workflows to the MySQL v2 node which uses parameterized queries. These workarounds do not fully remediate the risk and should only be used short-term.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-hwmj-qg4v-cvg9
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-59257"]
- Ecosystems
- ["npm"]
- Database Specific Severity
- MODERATE
- Cvss Version
- 4.0
Threat ID: 6a6150c99c2644c7f8d9ff36
Added to database: 07/22/2026, 23:22:49 UTC
Last enriched: 07/22/2026, 23:26:02 UTC
Last updated: 07/23/2026, 02:51:54 UTC
Views: 2
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.