n8n: LDAP Email-Based Account Linking Allows Privilege Escalation and Account Takeover

描述

Impact

When LDAP authentication is enabled, n8n automatically linked an LDAP identity to an existing local account if the LDAP email attribute matched the local account's email. An authenticated LDAP user who could control their own LDAP email attribute could set it to match another user's email — including an administrator's — and upon login gain full access to that account. The account linkage persisted even if the LDAP email was later reverted, resulting in a permanent account takeover.

  • LDAP authentication must be configured and active (non-default).

Patches

The issue has been fixed in n8n versions 2.4.0 and 1.121.0. 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:
- Disable LDAP authentication until the instance can be upgraded.
- Restrict LDAP directory permissions so that users cannot modify their own email attributes.
- Audit existing LDAP-linked accounts for unexpected account associations.

These workarounds do not fully remediate the risk and should only be used as short-term mitigation measures.

基本信息

类型
reviewed
严重度
high
GitHub 上的公告
打开公告 ↗
仓库公告
打开仓库公告 ↗
源代码
浏览源码 ↗
公开(公告)
2026-03-25 21:09:13 UTC
更新时间
2026-03-27 06:44:51 UTC
GitHub 审核
2026-03-25 21:09:13 UTC
NVD 公开
2026-03-25

EPSS Score

Score Percentile
0.02% 4.00%

CVSS Scores

Base score Version Severity Vector
8.2 3.1
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:N 点击展开
攻击向量 (AV:N)
经互联网或企业内可路由网段即可从远端触达,攻击者不必出现在设备旁。
攻击复杂度 (AC:H)
即便网络可达,也常要卡窗口、凑负载或特定版本组合才打得响。
权限要求 (PR:L)
一般用户权限即可,不必是管理员或 root。
用户交互 (UI:N)
无需受害者点击链接、放行宏或安装软件,攻击链可自动走完。
作用域 (S:C)
可从脆弱组件横向波及其他组件或更高权限域,爆炸半径更大。
机密性影响 (C:H)
批量读取、导出或长期潜伏窃取机密数据,在实战上成立。
完整性影响 (I:H)
可篡改审计日志、植入后门或大面积伪造业务数据,动摇信任根基。
可用性影响 (A:N)
不至于造成业务意义上的长时间停摆或灾难性性能崩塌。
8.8 4.0
CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:H/VA:N/SC:H/SI:H/SA:L 点击展开
攻击向量 (AV:N)
经互联网或企业可路由网段即可远程触达,攻击者不必出现在设备旁。
攻击复杂度 (AC:L)
步骤短、路径清晰,复现成本低。
攻击要求 (AT:P)
需特定中间件状态、数据落点或拓扑关系等附加前提。
权限要求 (PR:L)
一般用户权限足够,不必管理员/root。
用户交互 (UI:N)
无需受害者点击、放行宏或安装软件,攻击链可自动走完。
受影响系统的机密性影响 (VC:H)
面向批量窃取、长期潜伏或横向搬运机密数据,在实战上成立。
受影响系统的完整性影响 (VI:H)
可篡改审计链、植入后门或大面积伪造业务数据,动摇信任根基。
受影响系统的可用性影响 (VA:N)
不至于出现业务意义上的长时间停摆或灾难性性能崩塌。
后续系统的机密性影响 (SC:H)
机密面在下游扩散、批量外泄或长期潜伏,在实战上成立。
后续系统的完整性影响 (SI:H)
跨下游的大面积篡改或伪造现实可行。
后续系统的可用性影响 (SA:L)
下游可能出现延迟或局部停摆,但可用运维手段托住。

Identifiers

CWEs

CWE id Name
CWE-287 Improper Authentication

Credits

  • weblover12 (reporter)
  • 34selen (reporter)
  • B0RI (reporter)
  • jh-hack (reporter)

Affected packages (2)

Vulnerable version ranges and first patched releases as published by GitHub.

Ecosystem Package Vulnerable range First patched Vulnerable functions
npm n8n >= 2.0.0-rc.0, < 2.4.0 2.4.0
npm n8n < 1.121.0 1.121.0

References

cvelogic Threat Intelligence