SQL Injection Affecting n8n-nodes-base package, versions <2.24.0


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.26% (18th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about SQL Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JS-N8NNODESBASE-17752557
  • published1 Jul 2026
  • disclosed23 Jun 2026
  • creditsm1ee

Introduced: 23 Jun 2026

NewCVE-2026-54313  (opens in a new tab)
CWE-89  (opens in a new tab)

How to fix?

Upgrade n8n-nodes-base to version 2.24.0 or higher.

Overview

n8n-nodes-base is a Base nodes of n8n

Affected versions of this package are vulnerable to SQL Injection through the prepareItems logic used by the findOneAndReplace, findOneAndUpdate, and update operations in GenericFunctions.ts and MongoDb.node.ts. An authenticated workflow editor can supply a non-scalar updateKey value, such as an object or array, enabling the node to build a MongoDB query filter from attacker-controlled input. This lets the attacker match unintended documents and overwrite them with content of their choosing. For users running affected workflows, this can corrupt or replace data in MongoDB collections without the node rejecting the malicious filter value.

Workarounds

  • Limit workflow creation and editing permissions to fully trusted users only; this prevents authenticated workflow editors from supplying a malicious updateKey value in the MongoDB node’s Find And Replace path.
  • Disable the MongoDB node by adding n8n-nodes-base.mongoDb to the NODES_EXCLUDE environment variable; this blocks use of the vulnerable MongoDB node operations entirely.

CVSS Base Scores

version 4.0
version 3.1