n8n: Prototype Pollution in the AI Workflow Builder Connection Merge
What fixes it
No source in this snapshot names a fixed version.
Description
Impact
The AI workflow builder merges a workflow's connections using node names directly as object members, with no check for reserved keys. A name refused by the editor but accepted through the API can therefore reach the global object prototype through the builder's connect-nodes operation, a process-wide change that persists until the instance restarts.
Patches
The issue has been fixed in n8n versions 1.123.83, 2.42.1, and 2.41.4. 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:
- Restrict n8n instance access to fully trusted users only.
- Disable the AI Builder feature if it is not required.
- Audit existing workflows for nodes with reserved JavaScript property names such as
__proto__,constructor, orprototypeand remove or rename them.
These workarounds do not fully remediate the risk and should only be used as short-term mitigation measures.
Text from GitHub Advisory Database
Affected versions 3
- n8n, npm< 1.123.83GitHub
- n8n, npm< 2.42.1GitHub
- n8n, npm< 2.41.4GitHub