RUSTSEC-2026-0592: Stack overflow in `Url::origin()` on nested `blob:` URLs

Đang mở Phù hợp với người mới
#45 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
1/5
Thời gian dự kiến
Dưới một giờ
Mức phù hợp với người mới
68/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
rust
Lĩnh vực
build-system, security

Hướng nghiên cứu

Bản sửa là nâng cấp phụ thuộc: crate url phải chuyển từ 2.5.8 lên ít nhất 2.5.9, nên hãy bắt đầu từ mục url trong Cargo.toml và tệp lock. Chạy cargo update -p url, sau đó xác nhận phiên bản được giải quyết là 2.5.9 trở lên và build cùng các bài kiểm tra vẫn thành công. Hoàn thành khi tệp lock giải quyết url về phiên bản đã vá, không có cảnh báo mới và advisory không còn áp dụng cho dự án.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Stack overflow in Url::origin() on nested blob: 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.

Ngôn ngữ chính
Rust
Star
2
Fork
0
Merge trung bình
1 giờ 25 phút
Pull request đã merge (30 ngày)
1

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của stackabletech/stackable-odbc-trino

Tất cả issue của stackabletech/stackable-odbc-trino

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.