xr843/security-research
GitHub: xr843/security-research
AI/LLM安全研究项目,专注于多租户隔离、MCP协议和SSRF/cookie边界泄露。
Stars: 0 | Forks: 0
# AI/LLM 安全研究
针对 AI/LLM 基础设施的独立安全研究——重点关注广泛部署的 LLM 平台中的多租户隔离、MCP 协议攻击面以及 SSRF/cookie 边界泄露。
**已发布 10 个修复**,涵盖 **5 个主要项目**,总共有 **335,000+ GitHub 星标**,包括 **5 个 GHSA 咨询 ID**(1 个已发布,4 个预留待协调披露窗口)。另外 3 个修复目前正在审查中(Dify、Microsoft autogen、crewAI)。
## GHSA 咨询
| GHSA | 项目 | 类型 | 修复 PR | 状态 |
|---|---|---|---|---|
| GHSA-2qwc-c2cc-2xwv | Dify | 租户边界违规 | [dify#35797](https://github.com/langgenius/dify/pull/35797) | 预留 |
| GHSA-gvc6-fh3x-89xh | Dify | 路径遍历 | [dify#35796](https://github.com/langgenius/dify/pull/35796) | 预留 |
| GHSA-48xc-wmw8-3jr3 | Dify | 租户边界违规 | [dify#35793](https://github.com/langgenius/dify/pull/35793) | 预留 |
| GHSA-2mr9-9r47-px2g | Gradio | 跨空间 cookie 注入 | [gradio#13384](https://github.com/gradio-app/gradio/pull/13384) | 预留 |
| [GHSA-jmh7-g254-2cq9](https://github.com/advisories/GHSA-jmh7-g254-2cq9) | Gradio | SSRF(回归覆盖) | [gradio#13388](https://github.com/gradio-app/gradio/pull/13388) | **已发布** |
## 按项目分类
### [Dify](https://github.com/langgenius/dify) — 143k⭐
LLM 应用平台。重点:租户范围漏洞、插件守护进程路径遍历、密钥轮换完整性。
| PR | 类型 | 描述 |
|---|---|---|
| [#35843](https://github.com/langgenius/dify/pull/35843) | 密钥轮换完整性 | `reset-encrypt-key-pair` 在 `tool_builtin_providers` / `tool_api_providers` / `tool_mcp_providers` 中留下了过时的密文 — 扩展清除 + 回归测试 |
| [#35797](https://github.com/langgenius/dify/pull/35797) | 租户边界 | `FilePreviewApi` 文本提取端点接受任意租户范围(GHSA-2qwc-c2cc-2xwv,预留) |
| [#35796](https://github.com/langgenius/dify/pull/35796) | 路径遍历 | 插件守护进程文件路径接受 `../` 序列(GHSA-gvc6-fh3x-89xh,预留) |
| [#35793](https://github.com/langgenius/dify/pull/35793) | 租户边界 | 应用跟踪配置端点未进行租户范围限制(GHSA-48xc-wmw8-3jr3,预留) |
| [#34456](https://github.com/langgenius/dify/pull/34456) | IDOR | 数据源绑定未进行 `tenant_id` 验证,导致跨租户资源访问 |
| [#36197](https://github.com/langgenius/dify/pull/36197) *(审查中)* | SSRF | MCP `server_url` 接受内部地址(127.0.0.1,链路本地,RFC1918) |
### [Cherry Studio](https://github.com/CherryHQ/cherry-studio) — 46k⭐
多提供商 LLM 桌面客户端。重点:Electron 主机中的 MCP 协议攻击面。
| PR | 类型 | 描述 |
|---|---|---|
| [#13893](https://github.com/CherryHQ/cherry-studio/pull/13893) | XSS | `dangerouslySetInnerHTML` 渲染了未经验证的 MCP 服务器描述和搜索结果 |
| [#13892](https://github.com/CherryHQ/cherry-studio/pull/13892) | URL 验证 + 路径遍历 | `shell.openExternal` 接受 `file://` 和任意方案;伴随路径遍历保护 |
| [#14083](https://github.com/CherryHQ/cherry-studio/pull/14083) | 凭据卫生 | 已删除的 MCP 服务器 OAuth 令牌持久化存储在磁盘后端存储中 |
### [Gradio](https://github.com/gradio-app/gradio) — 42k⭐
ML 演示 / Spaces 框架。重点:代理层中的跨源隔离和 SSRF。
| PR | 类型 | 描述 |
|---|---|---|
| [#13384](https://github.com/gradio-app/gradio/pull/13384) | 跨源 cookie | `/proxy=` 在 Hugging Face Spaces 中共享单个 cookie jar,允许跨租户注入 cookie(GHSA-2mr9-9r47-px2g,预留) |
| [#13388](https://github.com/gradio-app/gradio/pull/13388) | SSRF 回归测试 | `Blocks.from_config` `proxy_url` SSRF 保护器的回归覆盖([GHSA-jmh7-g254-2cq9](https://github.com/advisories/GHSA-jmh7-g254-2cq9)) |
### [autogen](https://github.com/microsoft/autogen) — 58k⭐ *(审查中)*
Microsoft 代理编排框架。
| PR | 类型 | 描述 |
|---|---|---|
| [#7611](https://github.com/microsoft/autogen/pull/7611) | 代码执行沙箱 | 为 `LocalCommandLineCodeExecutor` 提供沙箱选择标志(解决 #7462) |
### [crewAI](https://github.com/crewAIInc/crewAI) — 52k⭐ *(审查中)*
多代理框架。
| PR | 类型 | 描述 |
|---|---|---|
| [#5307](https://github.com/crewAIInc/crewAI/pull/5307) | 代码注入 | 将计算器工具模板中的 `eval()` 替换为基于 AST 的安全评估器 |
## 重点关注领域
- **LLM 平台中的多租户隔离** — IDOR、租户范围差距、跨租户资源枚举(Dify 边界工作)
- **MCP 协议攻击面** — `server_url` 上的 SSRF、客户端中渲染的未经验证的由服务器提供的内容、OAuth 凭据生命周期(Dify + Cherry Studio + autogen)
- **跨源 cookie & 会话隔离** — 共享 jar、代理边界泄露(Gradio)
- **代理框架中的代码执行边界** — `eval()` 移除、沙箱功能(crewAI + autogen)
## 方法论
- 在适用的情况下通过 GitHub 安全咨询进行协调披露(10 个已发布的修复中分配了 5 个 GHSA ID;1 个已发布,4 个在上游披露窗口期间预留)。剩余的修复作为直接上游 `fix(security):` PR 或与正确性相关的加固发布。
- 每个修复都随同一 PR 中的回归测试一起发布
- 每个 PR 描述中包含根本原因、影响和重现方法
*由 [@xr843](https://github.com/xr843) 维护。同时正在构建 [fojin](https://github.com/xr843/fojin)(佛津)——开源佛教数字人文平台。*
标签:Chaos, Cookie边界泄漏, GitHub安全公告, MCP协议, SSRF漏洞, TLS抓取, XML 请求, 人工智能安全, 代码审查, 合规性, 多租户隔离, 大型语言模型安全, 安全修复, 安全响应, 安全开发, 安全测试, 安全漏洞, 安全漏洞管理, 安全社区, 安全策略, 安全补丁, 提示词设计, 攻击性安全, 攻击面, 日志审计, 漏洞披露, 红队平台, 网络安全, 请求拦截, 软件安全, 逆向工具, 隐私保护