Skip to content

检查传入的 external_ui ,防止路径穿越攻击#3974

Open
Cherrling wants to merge 10 commits intoSagerNet:testingfrom
Cherrling:repair_zip_safepath
Open

检查传入的 external_ui ,防止路径穿越攻击#3974
Cherrling wants to merge 10 commits intoSagerNet:testingfrom
Cherrling:repair_zip_safepath

Conversation

@Cherrling
Copy link
Copy Markdown

解压时直接使用 ZIP entry 名称拼接落盘路径,攻击者一旦能影响 External UI ZIP 的来源,例如代理商/机场投毒、yacd/zashboard 等面板分发链路遭供应链攻击、或可控 external_ui_download_url/传输链路,即可通过 ../ 路径把文件写出 external_ui 目录边界实现任意文件写入。

在某些情况下,为了处理 tun 的支持,用户可能使用 root 权限启动 sing-box 进程,则该漏洞可能造成本地提权,或通过 api 或可控配置文件写入 cron 造成 rce

@nekohasekai nekohasekai force-pushed the testing branch 4 times, most recently from ebf8a21 to e52c032 Compare April 1, 2026 08:22
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.

3 participants