Unexpected URL can be loaded via embed/object elements due to non-strict YouTube URL replacement
Originally disclosed on Mozilla
- Fixed in 7 days
- Paid in 13 days
- Disclosed after 7 days
Created attachment 9493014
fx_wrong_url_loaded_via_embed.html
When loading a YouTube URL of a particular format via an <embed> or <object> element, Firefox replaces the specified URL. It is done in `nsObjectLoadingContent::MaybeRewriteYoutubeEmbed` : https:// github.com/mozilla-firefox/firefox/blob/4b584585f7b4ed77738aa20a2d1bc2ba9e8a464f/dom/base/nsObjectLoadingContent.cpp#L508-L603
Here, the first `&` string contained in the specified URL is replaced with `?`: https://github.com/mozilla-firefox/firefox/blob/4b584585f7b4ed77738aa20a2d1bc2ba9e8a464f/dom/base/nsObjectLoadingContent.cpp#L578
However this replacement is not strct and allows fetching unexpected hosts.
The issue can be reproduced via the following HTML. If the PoC works correctly, `example.com` host instead of the expected YouTube host will be embedded in the subframe.
'''html
<embed src="https://example.com&@www.youtube.com/v/lG7U3fuNw3A"></embed>
'''
or
'''html
<object data="https://example.com&@www.youtube.com/v/lG7U3fuNw3A"></object>
'''
This can result in embedding unexpected hosts, even if the application embeds the URL from the embed/object tag after validating user-specified URL correctly.
The following is an example of content being loaded from an unexpected host even though the client-side JavaScript validates the specified host and protocol properly.
https://vulnerabledoma.in/fx_wrong_url_loaded_via_embed.html
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
What is known
A medium-severity open redirect bug in DOM: Core & HTML. Mozilla made it public on 12 June 2025 as CVE-2025-6429.
About Open redirect
A trusted site forwards users to any address an attacker picks; rarely paid alone, often the missing link in a chain.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
What is Open redirect?
A trusted site forwards users to any address an attacker picks; rarely paid alone, often the missing link in a chain.