Inappropriate implementation in Media Session (CVE-2026-11181)
A cross-origin subframe could set Media Session artwork to a URL on the top-level site, causing the browser to fetch it with the top frame's cookies and same-origin headers. This bypassed SameSite and Fetch Metadata protections, allowing blind GET-based CSRF against the top-level origin.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 50 days
Project Fortify, an experimental security project, has identified the following potential security issue. If you're a feature owner CC-ed on this bug, please do your best to review these reports without the Chrome Security team.
Overview: A cross-origin subframe can trigger credentialed GET requests from the top-level frame by specifying Media Session artwork URLs. This occurs because the browser delegates the image download to the primary main frame instead of the frame that provided the metadata. The resulting request bypasses SameSite cookie restrictions and Fetch Metadata defenses, enabling potential GET-based CSRF attacks.
Affected files:
content/browser/media/session/media_session_impl.cccontent/browser/web_contents/web_contents_impl.cccontent/browser/web_contents/web_contents_android.cccomponents/browser_ui/media/android/java/src/org/chromium/components/browser_ui/media/MediaImageManager.javathird_party/blink/renderer/modules/image_downloader/multi_resolution_image_resource_fetcher.cc
Estimated timestamp from git blame: 2022-08-11
Description
A potential vulnerability exists in how Chrome handles MediaSession artwork fetching. A cross-origin subframe that plays media can become the routed media session and specify an artwork URL. When the browser fetches this artwork, it mistakenly delegates the download task to the top-level main frame rather than the subframe. This causes the network request to be sent with the main frame's SiteForCookies and origin context, effectively bypassing SameSite cookie protections and Fetch Metadata (Sec-Fetch-Site) boundaries. This can be exploited to perform blind, GET-based Cross-Site Request Forgery (CSRF) against the top-level origin.
Technical Details
- When a cross-origin subframe plays media, it can be selected as the routed frame for the
WebContentsviaMediaSessionImpl::ComputeFrameForRouting. - The subframe can set
navigator.mediaSession.metadatawith anartworkURL pointing to a sensitive GET endpoint on the main frame's origin. - The browser receives this metadata via
MediaSessionServiceImpl::SetMetadata. URL validation inMediaMetadataSanitizer::CheckSanityrestricts the scheme (e.g., HTTP/HTTPS) but does not restrict the origin. - When a UI observer (like Global Media Controls) needs to display the artwork, it triggers
MediaSessionImpl::GetMediaImageBitmap(content/browser/media/session/media_session_impl.cc:1382). GetMediaImageBitmapcallsweb_contents()->DownloadImage(), which does not specify an initiator frame.- In
content/browser/web_contents/web_contents_impl.cc,DownloadImagedelegates toDownloadImageInFrameusing a default-constructed, emptyGlobalRenderFrameHostId. - Because the ID is empty,
DownloadImageInFramedefaults to usingGetPrimaryMainFrame()as the initiator frame. - The Mojo IPC to download the image is sent to the top-level main frame's renderer.
- The main frame renderer uses
MultiResolutionImageResourceFetcherto make the request, setting theSiteForCookiesto the main frame's document (third_party/blink/renderer/modules/image_downloader/multi_resolution_image_resource_fetcher.cc:211). - The Network Service treats the request as a same-site request, attaching
SameSite=StrictandSameSite=Laxcookies, and applying aSec-Fetch-Site: same-originheader. While the attacker cannot read the response (due to CORB/ORB and image decoding failures), state-changing GET endpoints will execute.
Potential Steps to Reproduce
Note: These are suggested steps based on static analysis, as our tooling agent cannot execute code to provide a working PoC.
-
An attacker embeds an iframe (
https://attacker.com/frame.html) on a victim site (https://victim.com). -
The user interacts with the iframe (or autoplay is permitted), causing it to play an audible media clip.
-
The iframe executes JavaScript to set the media session artwork to a sensitive endpoint on the victim site:
JavaScript navigator.mediaSession.metadata = new MediaMetadata({ title: 'Audio', artwork: [{ src: 'https://victim.com/account/delete?confirm=true', sizes: '512x512', type: 'image/png' }] }); -
The browser's media UI observes the metadata change and requests the artwork.
-
The browser commands the
victim.commain frame to fetch the URL. -
The GET request is sent to
https://victim.com/account/delete?confirm=truewith the user'svictim.comcookies andSec-Fetch-Site: same-origin, executing the action.
Suggested Fix
Modify MediaSessionImpl::GetMediaImageBitmap to avoid using the WebContents::DownloadImage overload that lacks a frame context. Instead, it should track which RenderFrameHost (via GlobalRenderFrameHostId) provided the artwork URL. It should then call WebContents::DownloadImageInFrame, passing the correct GlobalRenderFrameHostId of the routed subframe so that the image fetch originates from the correct renderer process and security context.
Evaluated with Chrome root at commit: 096fc8fdbfacf2546485756d03f160a3d04fcc9b
Results so far have been promising, but there can be wrong deductions. If this proves to be a false positive, please close as WAI; data from false positives will be used to improve accuracy over time. And please feel free to reach out to me directly if you have concerns or feedback on the project.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the browser's image download for Media Session artwork did not track which frame supplied the URL, so it defaulted to using the top-level main frame as the initiator, inheriting that frame's cookies and security context.
Impact
An attacker could perform blind, GET-based CSRF against the top-level origin, potentially triggering state-changing actions, though the response cannot be read due to CORB/ORB and image decoding failures.
What the attacker needed
Victim visits a site with attacker iframe; iframe plays audible media; victim site has state-changing GET endpoint
The fix
The fix should track which RenderFrameHost provided the artwork URL and use DownloadImageInFrame with that frame's ID, so the fetch originates from the correct security context.
How it was found
- An attacker embeds an iframe on a victim site.
- The iframe plays audible media to become the routed media session.
- The iframe sets Media Session artwork to a sensitive GET endpoint on the victim site.
- The browser's media UI requests the artwork.
- The browser commands the victim site's main frame to fetch the URL.
- The GET request is sent with the user's cookies and same-origin headers, executing the action.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
When a website plays audio or video, it can show a picture (artwork) in the browser's media controls. The browser was fetching that picture as if the top-level website had asked for it, not the smaller embedded frame that actually set it. This meant an attacker's embedded frame could make the browser send requests to the top website with the user's cookies, potentially performing actions the user did not intend.
What is CSRF?
Another site makes a signed-in user's browser perform an action they did not intend.