Skip to content

fix(data): 修正 6 条 n8n 样本的漏洞触发路径标注#54

Open
phx3334 wants to merge 7 commits into
Tencent:mainfrom
phx3334:New
Open

fix(data): 修正 6 条 n8n 样本的漏洞触发路径标注#54
phx3334 wants to merge 7 commits into
Tencent:mainfrom
phx3334:New

Conversation

@phx3334

@phx3334 phx3334 commented Jul 18, 2026

Copy link
Copy Markdown

resolve #6

背景

部分 n8n 相关样本的 {entry_point, critical_operation, trace} 虽然能定位到代码文件,但人工校验发现语义节点不准确:例如 RCE / 沙箱逃逸的关键操作落在 sanitizer、静态列表或疑似非执行点上,入口点也未能体现外部输入如何进入漏洞链路。本 PR 重新确认这些样本的真实入口点、关键操作与调用链。

变更内容

将 entry-00099 / 00100 / 00103 / 00176 / 00511 / 00512 的修正合入 data/entries.jsonl(其余 402 条原样不变)。
新增 entries.diff.csv(逐条 diff)与 entries.notes.md(每条修复说明)。

主要修正

entry-00176(Python 沙箱逃逸):critical_operation 由 constants.py:126 的 BLOCKED_ATTRIBUTES 静态集合定义,改到 task_analyzer.py:66 真正的黑名单比对施力点;并纠正原 desc 的机制误述——dunder 名混淆检查对纯双下划线名(如 objclass)不触发,真正的根因是 visit_Attribute 只覆盖字面 obj.attr、不分析 getattr 动态访问。

entry-00099 / 00100(表达式沙箱逃逸):critical_operation 由防御方 PrototypeSanitizer 定义改到真正执行点 evaluateExpression。

entry-00103(webhook CSP 绕过):entry_point 由非执行点 } 括号改到真正写入/读回 content-type 的 setResponseHeaders。

entry-00511(VM 引擎逃逸):critical_operation 由 native 回退分支改到 foundFunction.function.apply(...) 执行点。

entry-00512(VM __sanitize 覆写):critical_operation 位置(reset.ts:46)保留,仅细化 desc。

phx3334 added 7 commits July 16, 2026 18:56
…r 6 n8n entries

- Move critical_operation off sanitizer/static-list/non-execution points onto
  actual RCE sinks (evaluateExpression, Function.apply) and real input entry
  points (setResponseHeaders, etc.)
- Add missing execution-step trace nodes (expression.ts:452-453, extend.ts:79-85)
  so the taint flow is continuous
- Ship apply_fixes.py as the single-source generator with built-in self-check
- Keep diff.csv / notes.md in sync with entries.fixed.jsonl
…ent point

- Move critical_operation off the BLOCKED_ATTRIBUTES static declaration
  (constants.py:126) onto the actual AST enforcement point
  task_analyzer.py:66 (if node.attr in BLOCKED_ATTRIBUTES: in visit_Attribute)
- Fix the previously incorrect bypass mechanism in desc: the real gap is
  that visit_Attribute only inspects literal obj.attr AST nodes and never
  analyzes dynamic getattr(obj, name) / object.__getattribute__(obj, name)
  access, so __objclass__/__subclasses__ are reached via getattr and the
  blocklist is fully bypassed (not merely because __objclass__ is absent from
  the list)
- Sync notes.md and diff.csv
…; rename csv/md

- 将 entry-00099/00100/00103/00176/00511/00512 的修正合并进 data/entries.jsonl(其余 402 条不变)
- 删除独立的 entries.fixed.jsonl(已并入 data)
- entries.fixed.diff.csv -> entries.diff.csv,entries.fixed.notes.md -> entries.notes.md
- 贴合上游 PR 形态:修改 data + 添加 csv/md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

【2026犀牛鸟】修正 n8n 沙箱逃逸样本的入口点和关键操作语义

1 participant