Skip to main content

n8n EUVDEUVD-2026-38459

| CVE-2026-54313 MEDIUM
SQL Injection (CWE-89)
2026-06-16 https://github.com/n8n-io/n8n GHSA-jpq7-226w-6cxx
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. Recon
    Authenticate to n8n with low-privilege workflow editor account
  2. Delivery
    Open or create workflow in the n8n editor
  3. Exploit
    Add MongoDB Find And Replace node with malicious filter operators
  4. Install
    Trigger workflow execution via manual run, schedule, or webhook
  5. C2
    n8n passes unsanitized filter to MongoDB query engine
  6. Execute
    MongoDB matches unintended documents across collection
  7. Impact
    Attacker-controlled content overwrites targeted documents

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

Exploitation requires three concurrent conditions: (1) a valid n8n account with workflow edit or creation permissions - unauthenticated access is insufficient, and the PR:L CVSS metric confirms this; (2) the target n8n instance must have the MongoDB node active - if 'n8n-nodes-base.mongoDb' is listed in NODES_EXCLUDE, the vulnerable code path is unavailable; (3) the attacker must be able to execute the crafted workflow, either by running it directly or triggering its execution via an automated schedule or webhook. Exploitation is limited to actors who have been explicitly granted workflow editing rights, which is a distinct permission tier in n8n separate from read-only users. No victim interaction is required once the workflow is placed and executed. The scope change means a successful exploit's damage is felt in the connected MongoDB database rather than n8n's own internal state, potentially affecting any collection accessible via the configured MongoDB connection credentials.

Impact

The CVSS 3.1 score of 7.7 (AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:H/A:N) accurately captures the network-reachable, low-complexity nature of this exploit. The Scope:Changed metric is the key risk amplifier: the attacker's influence escapes the n8n application boundary into the underlying MongoDB database, enabling broad document corruption across collections. Real-world risk is meaningfully moderated by the PR:L requirement - exploitation demands a valid n8n account with workflow edit or creation permissions, which is not a default capability for all authenticated users. No EPSS score was available in the provided intelligence, and this CVE is not listed in the CISA KEV catalog. No public exploit code has been identified at time of analysis. The absence of a confidentiality impact (C:N) limits this to a data integrity threat: attackers can corrupt or mass-overwrite MongoDB documents but cannot directly exfiltrate them via this vector. Risk is elevated in multi-tenant n8n deployments, SaaS-style environments, or organizations where workflow editing access is broadly distributed rather than restricted to administrators.

Exploit ScenarioDerived

An authenticated n8n user with workflow edit access creates or modifies a workflow containing a MongoDB Find And Replace node, injecting MongoDB query operators (e.g., a $where expression or an operator-based predicate) into the filter value field. When the workflow executes, n8n passes the unsanitized filter directly to MongoDB, which evaluates it against the full document collection - matching unintended documents and overwriting them with attacker-controlled content, potentially corrupting critical application data across multiple collections. No public proof-of-concept has been identified at time of analysis.

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

NoSQL injection in n8n's MongoDB node (all versions prior to 2.24.0) enables authenticated users with workflow edit access to supply malicious filter values in the Find And Replace operation, causing MongoDB to match and overwrite documents far beyond the attacker's intended scope. The root cause is unsanitized user input being passed directly to MongoDB as a query filter without validation, and the scope change (S:C in CVSS) means the impact propagates from n8n itself into the connected MongoDB database layer. No public exploit has been identified at time of analysis, and exploitation is bounded by the requirement for a valid n8n account with workflow editing permissions.

RemediationAI

The primary remediation is to upgrade n8n to version 2.24.0 or later, which contains the vendor-confirmed fix per the security advisory at https://github.com/n8n-io/n8n/security/advisories/GHSA-jpq7-226w-6cxx. If an immediate upgrade is not feasible, two temporary mitigations are available, each with trade-offs: first, restrict workflow creation and editing permissions to fully trusted administrators only - this reduces the attack surface without disrupting MongoDB-dependent workflows, but limits collaborative use of the platform and may not be practical in environments with large user bases. Second, disable the MongoDB node entirely by adding 'n8n-nodes-base.mongoDb' to the NODES_EXCLUDE environment variable - this eliminates the vulnerable code path completely but will break all existing MongoDB-backed workflows. The vendor explicitly states that neither workaround fully remediates the risk and both should be treated as short-term measures only until upgrade to 2.24.0 is completed.

Affected VersionsENISA

n8n < 2.24.0

Affected Packages

npm n8n fix: 2.24.0

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

n8n is an open-source workflow automation platform distributed as an npm package (pkg:npm/n8n). Its built-in MongoDB integration node exposes a 'Find And Replace' operation that accepts user-supplied filter criteria to locate documents before overwriting them. The vulnerability occurs because filter values entered in the workflow editor are not validated or sanitized before being forwarded to MongoDB as raw query filter objects, allowing injection of MongoDB query operators (such as $where, $regex, or operator-based predicates) that can match a much broader document set than intended. The advisory and GHSA title both describe this as 'NoSQL Injection,' making CWE-943 (Improper Neutralization of Special Elements in Data Query Logic) a more precise root-cause classification than the assigned CWE-89 (SQL Injection), which is technically scoped to relational SQL syntax - this discrepancy appears to be a tooling classification artifact. The 'SQLi' tag attached to this CVE should be interpreted in the broader injection family context.

Know when the next one hits your stack

  • 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 7.7 HIGH

Workflow edit permission maps to PR:L; S:C reflects MongoDB as a separately impacted system; C:N and A:N apply as only document integrity is compromised.

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

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

1
CVSS changed
Jun 23, 2026 - 17:07 NVD
7.7 (MEDIUM) 6.5 (MEDIUM)

DescriptionCVE.org

Impact

An authenticated user with workflow edit access could supply a malicious filter value in the MongoDB node's Find And Replace operation. The value was not validated before being passed to MongoDB as a query filter, allowing unintended documents to be matched and overwritten with attacker-controlled content.

Patches

The issue has been fixed in n8n version 2.24.0. Users should upgrade to this version 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 MongoDB node by adding n8n-nodes-base.mongoDb 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 78% 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.

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