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

Aperta Adatta ai principianti
#459 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
62/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
rust
Ambito
security

Direzione di ricerca

Inizia cercando la dipendenza url in Cargo.toml e Cargo.lock, quindi esegui cargo tree -i url per capire se è diretta o se viene inclusa tramite i crate del motore JS. Alza il requisito a >=2.5.9 (oppure aggiorna il lockfile se la dipendenza è transitiva) ed esegui poi la suite di test esistente con cargo test. È completato quando il lockfile risolve url alla versione 2.5.9 o successiva e nessun'altra dipendenza nell'albero è rimasta su una versione precedente.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Rust
Stelle
18
Fork
5
Merge medio
1g 11h
PR unite (30g)
60

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di hyperlight-dev/hyperlight-js

Tutte le issue di hyperlight-dev/hyperlight-js

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.