{"id":"CVE-2026-59257","aliases":["EUVD-2026-42269","GHSA-2qp2-6frj-p9pq","GHSA-hwmj-qg4v-cvg9"],"status":"published","title":"n8n - SQL Injection in MySQL v1 executeQuery Operation via Expression Interpolation","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.","severity":{"version":"4.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","level":"medium","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-10","score":0.00572,"percentile":0.47612,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-89"],"published":"2026-07-08T13:49:13Z","modified":"2026-10-31T02:30:52Z","fixes":[{"ecosystem":"npm","package":"n8n","fixed_in":["1.123.61","2.28.1","2.27.4"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"npm","package":"n8n","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.123.61"}]}]},{"source":"ghsa","ecosystem":"npm","package":"n8n","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.28.0"},{"fixed":"2.28.1"}]}]},{"source":"ghsa","ecosystem":"npm","package":"n8n","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.0.0-rc.0"},{"fixed":"2.27.4"}]}]},{"source":"osv","ecosystem":"npm","package":"n8n","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"1.123.61"}]}]},{"source":"osv","ecosystem":"npm","package":"n8n","ranges":[{"type":"SEMVER","events":[{"introduced":"2.28.0"},{"fixed":"2.28.1"}]}]},{"source":"osv","ecosystem":"npm","package":"n8n","ranges":[{"type":"SEMVER","events":[{"introduced":"2.0.0-rc.0"},{"fixed":"2.27.4"}]}]}],"products":[{"vendor":"n8n","product":"n8n"},{"vendor":"n8n-io","product":"n8n"}],"references":[{"url":"https://github.com/n8n-io/n8n/security/advisories/GHSA-hwmj-qg4v-cvg9","tags":["vendor-advisory","Mitigation","Vendor Advisory","advisory","web"]},{"url":"https://www.vulncheck.com/advisories/n8n-sql-injection-in-mysql-v1-executequery-operation-via-expression-interpolation","tags":["third-party-advisory","Third Party Advisory","advisory","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-59257","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-2qp2-6frj-p9pq"},{"url":"https://github.com/n8n-io/n8n/releases/tag/n8n@1.123.61","tags":["web"]},{"url":"https://github.com/n8n-io/n8n/releases/tag/n8n@2.27.4","tags":["web"]},{"url":"https://github.com/n8n-io/n8n/releases/tag/n8n@2.28.1","tags":["web"]},{"url":"https://github.com/advisories/GHSA-hwmj-qg4v-cvg9"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/59xxx/CVE-2026-59257.json","tags":["advisory"]},{"url":"https://github.com/n8n-io/n8n","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2026-59257","title":"n8n - SQL Injection in MySQL v1 executeQuery Operation via Expression Interpolation","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.","status":"published","published":"2026-07-08T13:49:13.618Z","modified":"2026-10-29T21:16:04.286Z","cvss":[{"version":"4.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","level":"medium","assessor":"cna"}],"cwes":["CWE-89"],"updated_at":"2026-11-02T14:19:58.560602Z"}],"euvd":[{"id":"EUVD-2026-42269","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.","status":"published","published":"2026-07-08T13:49:13Z","modified":"2026-10-29T21:16:04Z","cvss":[{"version":"4.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","level":"medium"}],"updated_at":"2026-11-02T16:59:14.250155Z"}],"ghsa":[{"id":"GHSA-2qp2-6frj-p9pq","title":"Duplicate Advisory: MySQL v1 Node executeQuery Operation Allows SQL Injection via Unparameterized Expression Interpolation","description":"## Duplicate Advisory\n\nThis advisory has been withdrawn because it is a duplicate of GHSA-hwmj-qg4v-cvg9. This link is maintained to preserve external references.\n\n## Original Description\nn8n 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.","status":"withdrawn","published":"2026-07-08T15:32:02Z","modified":"2026-07-22T22:21:46Z","cvss":[{"version":"4.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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"medium"},{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high"}],"cwes":["CWE-89"],"updated_at":"2026-11-02T14:40:51.375752Z"},{"id":"GHSA-hwmj-qg4v-cvg9","title":"n8n: MySQL v1 Node executeQuery Operation Allows SQL Injection via Unparameterized Expression Interpolation","description":"## Impact\nThe legacy MySQL v1 node's `executeQuery` operation substitutes evaluated `{{ ... }}` expression values directly into the raw SQL string without parameterization. If a workflow uses this operation with expression-sourced values in the query and is connected to an externally-reachable trigger (such as a Webhook node), attacker-controlled input reaching those expressions results in SQL injection.\n\nSuccessful exploitation allows arbitrary SQL execution with the configured MySQL credentials' privileges, enabling unauthorized disclosure, modification, or deletion of data in the downstream database. MySQL v2 node is not affected.\n\nThis issue can affect only instances running workflows that use the MySQL v1 node with `executeQuery` operations.\n\n## Patches\nThe issue has been fixed in n8n versions 1.123.61, 2.27.4, and 2.28.1. Users should upgrade to one of these versions or later to remediate the vulnerability.\n\n## Workarounds\nIf upgrading is not immediately possible, administrators should consider the following temporary mitigations:\n- Disable the MySQL node by adding `n8n-nodes-base.mySql` to the `NODES_EXCLUDE` environment variable, or audit and restrict access to workflows using the MySQL v1 node with the `executeQuery` operation.\n- Ensure that webhook endpoints used in workflows containing MySQL v1 `executeQuery` nodes with expression interpolation require authentication.\n- Migrate affected workflows to use the MySQL v2 node, which uses parameterized queries.\n\nThese workarounds do not fully remediate the risk and should only be used as short-term mitigation measures.","status":"published","published":"2026-07-22T22:22:22Z","modified":"2026-07-22T22:22:23Z","cvss":[{"version":"4.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","level":"medium"}],"cwes":["CWE-89"],"updated_at":"2026-11-02T14:40:51.375752Z"}],"nvd":[{"id":"CVE-2026-59257","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.","status":"published","published":"2026-07-08T14:17:20.807Z","modified":"2026-10-29T19:17:24.86Z","cvss":[{"version":"4.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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"medium","assessor":"secondary"},{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high","assessor":"primary"}],"cwes":["CWE-89"],"updated_at":"2026-11-02T14:12:28.040501Z"}],"osv":[{"id":"CVE-2026-59257","title":"n8n - SQL Injection in MySQL v1 executeQuery Operation via Expression Interpolation","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.","status":"published","published":"2026-07-08T13:49:13.618Z","modified":"2026-10-31T02:30:52.889168878Z","cvss":[{"version":"4.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","level":"medium"}],"cwes":["CWE-89"],"updated_at":"2026-11-02T15:45:12.496548Z"},{"id":"GHSA-2qp2-6frj-p9pq","title":"Duplicate Advisory: MySQL v1 Node executeQuery Operation Allows SQL Injection via Unparameterized Expression Interpolation","description":"## Duplicate Advisory\n\nThis advisory has been withdrawn because it is a duplicate of GHSA-hwmj-qg4v-cvg9. This link is maintained to preserve external references.\n\n## Original Description\nn8n 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.","status":"withdrawn","published":"2026-07-08T15:32:02Z","modified":"2026-07-22T22:31:07.317628573Z","cvss":[{"version":"3.1","score":8.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high"},{"version":"4.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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"medium"}],"cwes":["CWE-89"],"updated_at":"2026-11-02T15:46:34.700741Z"},{"id":"GHSA-hwmj-qg4v-cvg9","title":"n8n: MySQL v1 Node executeQuery Operation Allows SQL Injection via Unparameterized Expression Interpolation","description":"## Impact\nThe legacy MySQL v1 node's `executeQuery` operation substitutes evaluated `{{ ... }}` expression values directly into the raw SQL string without parameterization. If a workflow uses this operation with expression-sourced values in the query and is connected to an externally-reachable trigger (such as a Webhook node), attacker-controlled input reaching those expressions results in SQL injection.\n\nSuccessful exploitation allows arbitrary SQL execution with the configured MySQL credentials' privileges, enabling unauthorized disclosure, modification, or deletion of data in the downstream database. MySQL v2 node is not affected.\n\nThis issue can affect only instances running workflows that use the MySQL v1 node with `executeQuery` operations.\n\n## Patches\nThe issue has been fixed in n8n versions 1.123.61, 2.27.4, and 2.28.1. Users should upgrade to one of these versions or later to remediate the vulnerability.\n\n## Workarounds\nIf upgrading is not immediately possible, administrators should consider the following temporary mitigations:\n- Disable the MySQL node by adding `n8n-nodes-base.mySql` to the `NODES_EXCLUDE` environment variable, or audit and restrict access to workflows using the MySQL v1 node with the `executeQuery` operation.\n- Ensure that webhook endpoints used in workflows containing MySQL v1 `executeQuery` nodes with expression interpolation require authentication.\n- Migrate affected workflows to use the MySQL v2 node, which uses parameterized queries.\n\nThese workarounds do not fully remediate the risk and should only be used as short-term mitigation measures.","status":"published","published":"2026-07-22T22:22:22Z","modified":"2026-07-22T22:31:06.001943816Z","cvss":[{"version":"4.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","level":"medium"}],"cwes":["CWE-89"],"updated_at":"2026-11-02T15:46:49.621585Z"}]}}
