RUSTSEC-2026-0592: Stack overflow in `Url::origin()` on nested `blob:` URLs
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
研究方向
首先在 workspace 根目錄執行 cargo tree -i url,查看 url 是直接依賴還是被間接引入,然後在相關的 Cargo.toml(workspace 根目錄或成員 crate)中找到版本約束。將其提升到 >=2.5.9(或執行 cargo update -p url,如果它只存在於 Cargo.lock 中),然後重新建置。完成意味著 cargo tree -i url 顯示 2.5.9 或更新版本,且 workspace 仍能乾淨地建置和測試;檢查是否有任何程式碼呼叫 url::quirks::origin() 或依賴 blob: URL 傳回元組 origin,因為這些結果會改變。
由索引模型根據 Issue 內容生成。
描述
Stack overflow in
Url::origin()on nestedblob:URLs
| Details | |
|---|---|
| Package | url |
| Version | 2.5.8 |
| URL | https://github.com/servo/rust-url/pull/1186 |
| Date | 2026-11-20 |
| Patched versions | >=2.5.9 |
In url 2.5.8 and earlier, Url::origin() handled a blob: URL by parsing its path as another URL and calling itself on the result. It did so regardless of the inner URL's scheme, blob included. Each blob: prefix cost one stack frame, with no limit on nesting depth. Url::parse() accepts a URL with 10,000 blob: prefixes followed by https://example.com/ (50,020 bytes in total); calling Url::origin() on it overflowed the default 2 MiB stack of a spawned thread.
A stack overflow aborts the whole process, and catch_unwind() does not catch it. One such URL crashes any program that calls Url::origin() on untrusted input. url::quirks::origin() also calls Url::origin(). For example, Servo's URL.origin DOM getter calls url::quirks::origin(), so a script on a page can trigger the overflow.
url 2.5.9 follows the URL Standard: Url::origin() takes the origin of the inner URL only when its scheme is http, https, or file, returns an opaque origin otherwise, and never calls itself. A blob: URL with another inner scheme that previously produced a tuple origin, such as blob:ws://... or blob:blob:https://..., now returns an opaque origin.
See advisory page for additional details.
- 主要語言
- Rust
- 星號
- 4.8k
- 分支
- 222
- 平均合併
- 1 天 16 小時
- 30 天內合併 PR
- 60
環境準備
在瀏覽器裡用你自己的 GitHub 帳號啟動這個專案的開發容器。
- 沒有 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
hyperlight-dev/hyperlight 的其他 Issue
-
S-needs-triage
難度 2/5 1-3 小時 新手友好度 64/100
hyperlight-dev/hyperlight#2073 ·
維護者通常 1 天內回覆
-
C-bug S-needs-triage
難度 2/5 1-3 小時 新手友好度 82/100
hyperlight-dev/hyperlight#2056 ·
維護者通常 1 天內回覆
-
A-docs C-bug S-needs-triage
難度 2/5 1-3 小時 新手友好度 72/100
hyperlight-dev/hyperlight#2027 ·
維護者通常 1 天內回覆
-
S-needs-triage
難度 2/5 1-3 小時 新手友好度 65/100
hyperlight-dev/hyperlight#1970 ·
維護者通常 1 天內回覆
-
S-needs-triage
難度 2/5 1-3 小時 新手友好度 72/100
hyperlight-dev/hyperlight#1940 ·
維護者通常 1 天內回覆
查看 hyperlight-dev/hyperlight 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 64/100
維護者通常 1 天內回覆
-
難度 1/5 1 小時以內 新手友好度 86/100
-
tests
難度 2/5 1-3 小時 新手友好度 70/100
vfarcic/dot-agent-deck#2512 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 65/100
pop-os/cosmic-applets#1641 ·
維護者通常 3 天內回覆
-
難度 2/5 1-3 小時 新手友好度 70/100
pop-os/cosmic-store#650 ·