Skip to main content

n8n EUVDEUVD-2026-38470

| CVE-2026-54310 MEDIUM
SQL Injection (CWE-89)
2026-06-16 https://github.com/n8n-io/n8n GHSA-c37g-w77q-m4vp
6.5
CVSS 4.0 · Vendor: https://github.com/n8n-io/n8n
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Authenticate to n8n with workflow editor credentials
  2. Delivery
    Create or modify workflow containing Postgres v1 or TimescaleDB node
  3. Exploit
    Inject crafted SQL payload into node parameters
  4. Execution
    n8n executes unsanitized query against connected database
  5. Persist
    Exfiltrate, modify, or destroy database contents
  6. Impact
    Escalate via database account privileges if over-permissioned

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Parameterized queries, prepared statements
MITRE ATT&CK

2 techniques across 2 tactics: Initial Access, Persistence

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

The attacker must be authenticated to the n8n instance and hold a role that permits creating or modifying workflows - this is not a default end-user capability and requires explicit permission assignment by an n8n administrator. The target workflow must use the legacy Postgres v1 node (n8n-nodes-base.postgres) or the TimescaleDB node (n8n-nodes-base.timescaleDb); the newer/current Postgres node is not mentioned as affected. The connected database credential must be configured and active within the node. The scope of database-level impact is bounded by the privileges of the configured database account: a read-only account limits the attacker to data exfiltration only, while a superuser or high-privilege account enables destructive or escalation actions. Exploitation does NOT require network proximity to the database server - only access to the n8n web interface. The vulnerability is NOT exploitable by unauthenticated users, anonymous visitors, or authenticated users who lack workflow editing rights.

Impact

The vendor-assigned CVSS 9.9 (AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H) is well-calibrated and independently corroborated by the advisory description. The network attack vector is accurate: n8n exposes a web interface accessible over the network. Attack complexity is genuinely low once the attacker has workflow editor access - no race conditions or chained prerequisites are required. The PR:L designation is the primary risk limiter: the attacker must hold authenticated n8n credentials with workflow creation or modification rights, which is not a guest or anonymous capability. However, in many organizational deployments, workflow editing is distributed broadly across teams, effectively lowering the practical barrier. The scope change is the most consequential metric: SQL injection pivots the attack from the n8n application into the database, multiplying potential impact. No EPSS score data was provided in the input, so exploitation probability cannot be quantified probabilistically. No CISA KEV listing and no public POC exist at time of analysis - this reduces immediate urgency compared to actively exploited CVEs, but the straightforward attack technique (SQL injection is well-understood) means POC development would be trivial for a skilled practitioner. Real-world risk is high for organizations with loosely controlled workflow editor permissions and high-privilege database accounts configured in n8n credentials; risk is meaningfully reduced where workflow editing is restricted to a small number of fully trusted administrators and where database accounts follow least-privilege principles.

Exploit ScenarioDerived

An attacker who holds n8n credentials with workflow editor rights creates or modifies a workflow, embedding SQL injection payloads within the parameters of a Postgres v1 or TimescaleDB node - for example, crafting a table name or query field that terminates the intended SQL and appends a malicious statement such as a UNION SELECT to exfiltrate credential tables or a DROP TABLE to destroy data. The injected SQL executes server-side under the identity of the database account configured in the n8n credential store, meaning a DBA-level account could yield full database control or even OS command execution via PostgreSQL's COPY TO PROGRAM. No public POC is known at time of analysis, though the attack class is elementary for practitioners familiar with SQL injection.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jun 16, 2026

SQL injection in n8n's legacy Postgres v1 and TimescaleDB workflow nodes allows an authenticated workflow editor to inject and execute arbitrary SQL against the connected database, operating under the privileges of the configured database account. Affected versions span all n8n npm releases below 2.25.7 and the 2.26.0-2.26.1 range, with the CVSS 9.9 score reflecting a confirmed scope change: the injection escapes the n8n application layer into the underlying database system (S:C), enabling full confidentiality, integrity, and availability compromise of database contents. No public exploit code and no CISA KEV listing have been identified at time of analysis, but the low-privilege requirement and network-accessible attack vector make this a critical priority for any deployment where workflow editing access is broadly granted.

RemediationAI

The primary remediation is to upgrade n8n to version 2.25.7 or 2.26.2 (or any later release), as confirmed by the vendor advisory at https://github.com/n8n-io/n8n/security/advisories/GHSA-c37g-w77q-m4vp. Administrators running the 2.25.x branch should target 2.25.7; those on the 2.26.x branch should target 2.26.2. If immediate upgrade is not feasible, two temporary compensating controls are available: first, restrict workflow creation and editing permissions exclusively to fully trusted users - this narrows the attack surface but does not eliminate risk if a trusted account is compromised or acts maliciously, and has the operational trade-off of blocking legitimate workflow development; second, disable the Postgres v1 and TimescaleDB nodes by adding n8n-nodes-base.postgres and n8n-nodes-base.timescaleDb to the NODES_EXCLUDE environment variable - this eliminates the vulnerable code paths entirely but will break all existing workflows that depend on these nodes, requiring migration to unaffected node variants before re-enabling database connectivity. The vendor explicitly notes that neither workaround fully remediates the risk; both should be treated as short-term bridges to patching.

Affected VersionsENISA

n8n < 2.25.7
n8n 2.26.0, < 2.26.2

Affected Packages

npm n8n fix: 2.25.7, 2.26.2

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in npm

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The vulnerability is a classic CWE-89 (Improper Neutralization of Special Elements used in an SQL Command) present in two n8n workflow node implementations: the legacy 'Postgres v1' node (n8n-nodes-base.postgres) and the 'TimescaleDB' node (n8n-nodes-base.timescaleDb). TimescaleDB is a PostgreSQL extension/derivative, and both nodes share similar SQL construction patterns, suggesting a common root cause: user-supplied workflow parameters are interpolated directly into SQL query strings without adequate parameterization or input sanitization. The affected package is pkg:npm/n8n, confirming this is the core Node.js npm distribution of the n8n workflow automation platform. The CVSS scope change (S:C) is technically accurate because a successful SQL injection breaks the application-layer trust boundary, affecting the database server as a distinct security scope from the n8n runtime itself. Depending on the permissions of the configured database account, impact can extend to reading all accessible schemas, writing or truncating data, and - in over-privileged configurations - executing OS-level operations via PostgreSQL extensions such as pg_execute_server_program or COPY TO/FROM PROGRAM.

Know when PostgreSQL gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/n8n-io/n8n) PRIMARY 6.5 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:N/SC:H/SI:H/SA:H
vuln.today AI 9.9 CRITICAL

Network-accessible n8n web UI requires only low-privilege workflow editor role; SQL injection escapes application into database (S:C) yielding full CIA impact on database contents.

3.1 AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H

Primary rating from Vendor (https://github.com/n8n-io/n8n).

CVSS VectorVendor: https://github.com/n8n-io/n8n

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
Low
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
None
Subsequent system: Confidentiality
High
Subsequent system: Integrity
High
Subsequent system: Availability
High

Lifecycle Timeline

2
CVSS changed
Jun 23, 2026 - 17:07 NVD
9.9 (MEDIUM) 6.5 (MEDIUM)
CVE Published
Jun 16, 2026 - 17:51 github-advisory
MEDIUM 9.9

DescriptionCVE.org

Impact

An authenticated user with permission to create or modify workflows could supply a crafted parameters to the TimescaleDB and/or legacy Postgres v1 node's allowing arbitrary SQL to be injected and executed against the connected database within the privileges of the configured database account.

Patches

The issue has been fixed in n8n versions 2.25.7, and 2.26.2. 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.
  • Disable the Postgres and TimescaleDB node by adding n8n-nodes-base.postgres, n8n-nodes-base.timescaleDb to the NODES_EXCLUDE environment variable.

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

Threat Intelligence Overview

EPSS Score
0.3%
Top 77% exploitable
Threat Intel
1
1 source
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

32
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +32
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

SQL injection exploits the way applications construct database queries by mixing user input directly into SQL statements.

CVE-2025-1094 HIGH POC
8.1 Feb 13

PostgreSQL libpq functions PQescapeLiteral(), PQescapeIdentifier(), PQescapeString(), and PQescapeStringConn() improperl

CVE-2024-55964 CRITICAL POC
9.8 Mar 26

An issue was discovered in Appsmith before 1.52. Rated critical severity (CVSS 9.8), this vulnerability is remotely expl

CVE-2013-1899 MEDIUM POC
6.5 Apr 04

Argument injection vulnerability in PostgreSQL 9.2.x before 9.2.4, 9.1.x before 9.1.9, and 9.0.x before 9.0.13 allows re

CVE-2026-20253 CRITICAL POC
9.8 Jun 10

Unauthenticated arbitrary file write in Splunk Enterprise (below 10.2.4 and 10.0.7) and Splunk Cloud Platform (below 10.

CVE-2026-9586 CRITICAL POC
9.3 Jul 17

Unauthenticated SQL injection in Sangoma Switchvox SMB Edition 8.3 (build 104997) lets remote attackers execute arbitrar

CVE-2017-7546 CRITICAL
9.8 Aug 16

PostgreSQL versions before 9.2.22, 9.3.18, 9.4.13, 9.5.8 and 9.6.4 are vulnerable to incorrect authentication flaw allow

CVE-2015-1352 MEDIUM POC
5.0 Mar 30

The build_tablename function in pgsql.c in the PostgreSQL (aka pgsql) extension in PHP through 5.6.7 does not validate t

CVE-2024-10553 CRITICAL POC
9.8 Mar 20

A vulnerability in the h2oai/h2o-3 REST API versions 3.46.0.4 allows unauthenticated remote attackers to execute arbitra

CVE-2019-9193 HIGH POC
7.2 Apr 01

In PostgreSQL 9.3 through 11.2, the "COPY TO/FROM PROGRAM" function allows superusers and users in the 'pg_execute_serve

CVE-2026-40887 CRITICAL POC
9.1 Apr 14

Unauthenticated SQL injection in Vendure Shop API allows remote attackers to execute arbitrary SQL commands against the

CVE-2022-24760 CRITICAL POC
10.0 Mar 12

Parse Server is an open source http web server backend. Rated critical severity (CVSS 10.0), this vulnerability is remot

CVE-2025-56157 CRITICAL POC
9.8 Dec 18

Hard-coded default PostgreSQL credentials shipped in the docker-compose.yaml of langgenius Dify through version 1.5.1 al

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy