Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconAuthenticate to n8n with low-privilege workflow editor account
-
DeliveryOpen or create workflow in the n8n editor
-
ExploitAdd MongoDB Find And Replace node with malicious filter operators
-
InstallTrigger workflow execution via manual run, schedule, or webhook
-
C2n8n passes unsanitized filter to MongoDB query engine
-
ExecuteMongoDB matches unintended documents across collection
-
ImpactAttacker-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. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – 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
Affected Packages
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
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
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.
Primary rating from Vendor (https://github.com/n8n-io/n8n).
CVSS VectorVendor: https://github.com/n8n-io/n8n
Lifecycle Timeline
1DescriptionCVE.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.mongoDbto theNODES_EXCLUDEenvironment variable.
These workarounds do not fully remediate the risk and should only be used as short-term mitigation measures.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
SQL injection exploits the way applications construct database queries by mixing user input directly into SQL statements.
EUVD-2026-38459
GHSA-jpq7-226w-6cxx
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB