CVE-2026-59257 n8n - SQL Injection in MySQL v1 executeQuery Operation via Expression Interpolation

Medium 5.3 Published Updated

Attackers can execute arbitrary SQL commands via expression interpolation in the legacy MySQL v1 node when connected to external triggers.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2026-59257?

CVE-2026-59257 is a medium-severity SQL injection vulnerability in N8n N8n, published on 8 Jul 2026. Any signed-in user can exploit it over the network, with no action from the victim.

Official 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.

Weakness: CWE-89

Which versions are affected by CVE-2026-59257?

6 open source packages ship an affected version, including n8n. It affects 1 product.

PackageAffectedFixed in
n8n npmAll versions1.123.61
n8n npmAll versions1.123.61
n8n npmFrom 2.0.0-rc.02.27.4
n8n npmFrom 2.0.0-rc.02.27.4
n8n npmFrom 2.28.02.28.1
n8n npmFrom 2.28.02.28.1

Products include N8n N8n.

How do I fix CVE-2026-59257?

Upgrade n8n to a fixed version for your release line: 1.123.61, 2.27.4 or 2.28.1.

Use parameterised queries everywhere and never build SQL by joining strings. Upgrade affected software first; a web application firewall only buys time. More about SQL injection.

Is CVE-2026-59257 being exploited?

There is no known exploitation of CVE-2026-59257 in the wild and no public exploit code.

All N8n N8n vulnerabilities

Sources

Also known as CLEANSTART-2026-OK91929, GHSA-hwmj-qg4v-cvg9, MINI-84f3-3f43-q37g.

Is CVE-2026-59257 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free