Description
n8n before 1.123.61, 2.x before 2.27.4, and 2.28.x before 2.28.1 contains a SQL injection vulnerability in the legacy MySQL v1 node's executeQuery operation. The operation substitutes evaluated {{ ... }} expression values directly into the raw SQL string without parameterization. When a workflow uses this operation with expression-sourced values and is connected to an externally-reachable trigger (such as a Webhook node), attacker-controlled input reaching those expressions results in SQL injection, allowing execution of arbitrary SQL with the configured MySQL credentials' privileges. The MySQL v2 node, which uses parameterized queries, is not affected.
Published: 2026-07-08
Score: 5.3 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The vulnerability is a classic SQL injection (CWE‑89) in the legacy MySQL v1 node of n8n. The executeQuery operation directly concatenates values resolved from {{ … }} expression evaluations into a raw SQL string, bypassing parameterization. When a workflow uses this node with expressions that receive data supplied by an externally reachable trigger, an attacker can inject arbitrary SQL and force its execution with the credentials configured for the node.

Affected Systems

n8n workflow automation platform versions prior to 1.123.61, 2.x prior to 2.27.4, and 2.28.x prior to 2.28.1 are vulnerable. The newer MySQL v2 node, which employs parameterized queries, is not affected.

Risk and Exploitability

The CVSS score of 5.3 classifies the issue as moderate. The EPSS score is less than 1%, and the vulnerability is not listed in the CISA KEV catalog. The likely attack vector is remote, through an exposed trigger such as a Webhook node; exploitation requires the workflow to invoke the vulnerable MySQL v1 node with expressions that accept external input. Successful exploitation would let an attacker execute arbitrary SQL statements and obtain the privileges of the configured database user.

Generated by OpenCVE AI on July 26, 2026 at 17:51 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Update n8n to a patched release (≥ 1.123.61, ≥ 2.27.4, or ≥ 2.28.1).
  • Replace any MySQL v1 nodes in workflows with the MySQL v2 node, which uses parameterized queries and is immune to the flaw.
  • If the MySQL v1 node must be retained, remove or sanitize all {{…}} expressions that incorporate data from external triggers such as Webhook nodes to eliminate the injection surface.

Generated by OpenCVE AI on July 26, 2026 at 17:51 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-hwmj-qg4v-cvg9 n8n: MySQL v1 Node executeQuery Operation Allows SQL Injection via Unparameterized Expression Interpolation
History

Thu, 09 Jul 2026 14:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Wed, 08 Jul 2026 14:15:00 +0000

Type Values Removed Values Added
Description n8n before 1.123.61, 2.x before 2.27.4, and 2.28.x before 2.28.1 contains a SQL injection vulnerability in the legacy MySQL v1 node's executeQuery operation. The operation substitutes evaluated {{ ... }} expression values directly into the raw SQL string without parameterization. When a workflow uses this operation with expression-sourced values and is connected to an externally-reachable trigger (such as a Webhook node), attacker-controlled input reaching those expressions results in SQL injection, allowing execution of arbitrary SQL with the configured MySQL credentials' privileges. The MySQL v2 node, which uses parameterized queries, is not affected.
Title n8n - SQL Injection in MySQL v1 executeQuery Operation via Expression Interpolation
First Time appeared N8n
N8n n8n
Weaknesses CWE-89
CPEs cpe:2.3:a:n8n:n8n:*:*:*:*:*:node.js:*:*
Vendors & Products N8n
N8n n8n
References
Metrics cvssV4_0

{'score': 5.3, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:N/VI:N/VA:N/SC:H/SI:H/SA:N'}


cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-07-09T13:39:51.132Z

Reserved: 2026-07-04T12:17:14.302Z

Link: CVE-2026-59257

cve-icon Vulnrichment

Updated: 2026-07-09T13:39:46.215Z

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-07-26T18:00:05Z

Weaknesses
  • CWE-89

    Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')