`Url::origin()` · Stack Overflow
Affects urlSource GCVE Database
Rated High by Threat Radar's AI analysis
- Patch
- Available – fixed in 2.5.9
Data as of 22 Nov 2026, 10:39 UTC
What to do
Upgrade url to 2.5.9.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
crates.iourlpkg:cargo/urlOther threats | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
Upgrade to `url` crate version 2.5.9 or later, where the vulnerability is fixed by limiting recursive calls in `Url::origin()` and returning opaque origins for unsupported schemes. Avoid calling `Url::origin()` on untrusted input if upgrading is not immediately possible.
Description
A stack overflow vulnerability exists in the `Url::origin()` function of the Rust `url` crate version 2.5.8 and earlier. This occurs when handling nested `blob:` URLs, where each `blob:` prefix causes a recursive call without limit, leading to stack exhaustion and process abort. The issue is fixed in version 2.5.9, which limits recursive calls to certain schemes and returns an opaque origin otherwise.