n8n: Cross-Project Agent Ownership Transfer via Client-Supplied Agent ID
What fixes it
No source in this snapshot names a fixed version.
Description
Impact
The Agents create endpoint accepted an identifier supplied by the caller and checked permissions only against the project named in the request. Saving an entity with an existing identifier updated that row rather than failing, and the path never checked which project the existing row belonged to. A user with read-only access to a project's Agents can move one into their own project, where its name, schema and version are rewritten in the same request.
Patches
The issue has been fixed in n8n versions 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.
- Audit team project memberships and remove viewer access for any users who should not have visibility of Agent IDs in sensitive projects.
- Disable the agents module if it is not required.
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 2
- n8n, npm< 2.42.1GitHub
- n8n, npm< 2.41.4GitHub