Executive brief
n8n is a workflow automation platform that connects to databases and services via node-based workflows. The MongoDB node, which allows users to query, delete, and aggregate data in MongoDB databases, fails to sanitize user input when processing database queries. An attacker who can control data flowing into a MongoDB query operation can inject MongoDB operators to read entire collections, delete all records, or perform other unauthorized database operations.
Technical details
This is a NoSQL injection vulnerability (CWE-943) in n8n's MongoDB node. The Find, Delete, and Aggregate operations parse the Query parameter as JSON after expression resolution without sanitizing MongoDB operators like $ne or $where. An attacker who can influence the resolved query through externally-controlled data (e.g., webhook input, previous node output) can inject malicious operators to bypass the intended single-document lookup logic, enabling full-collection disclosure, full-collection deletion, or arbitrary database operations. The vulnerability requires the attacker to have workflow configuration capabilities or control over data sources feeding into the MongoDB node query field. Patches are available in n8n versions 1.123.69, 2.33.4, and 2.34.1 or later.
Affected products
- n8n n8n before 1.123.69, 2.33.4, 2.34.1
Timeline
- 2026-08-05: disclosed
- 2026-08-20: advisory
- 2026-08-20: patched: Patched in versions 1.123.69, 2.33.4, and 2.34.1