Skip to content
CSRF Advisory Advanced CVE-2026-11181

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.cc
  • content/browser/web_contents/web_contents_impl.cc
  • content/browser/web_contents/web_contents_android.cc
  • components/browser_ui/media/android/java/src/org/chromium/components/browser_ui/media/MediaImageManager.java
  • third_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

  1. When a cross-origin subframe plays media, it can be selected as the routed frame for the WebContents via MediaSessionImpl::ComputeFrameForRouting.
  2. The subframe can set navigator.mediaSession.metadata with an artwork URL pointing to a sensitive GET endpoint on the main frame's origin.
  3. The browser receives this metadata via MediaSessionServiceImpl::SetMetadata. URL validation in MediaMetadataSanitizer::CheckSanity restricts the scheme (e.g., HTTP/HTTPS) but does not restrict the origin.
  4. 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).
  5. GetMediaImageBitmap calls web_contents()->DownloadImage(), which does not specify an initiator frame.
  6. In content/browser/web_contents/web_contents_impl.cc, DownloadImage delegates to DownloadImageInFrame using a default-constructed, empty GlobalRenderFrameHostId.
  7. Because the ID is empty, DownloadImageInFrame defaults to using GetPrimaryMainFrame() as the initiator frame.
  8. The Mojo IPC to download the image is sent to the top-level main frame's renderer.
  9. The main frame renderer uses MultiResolutionImageResourceFetcher to make the request, setting the SiteForCookies to the main frame's document (third_party/blink/renderer/modules/image_downloader/multi_resolution_image_resource_fetcher.cc:211).
  10. The Network Service treats the request as a same-site request, attaching SameSite=Strict and SameSite=Lax cookies, and applying a Sec-Fetch-Site: same-origin header. 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.

  1. An attacker embeds an iframe (https://attacker.com/frame.html) on a victim site (https://victim.com).

  2. The user interacts with the iframe (or autoplay is permitted), causing it to play an audible media clip.

  3. 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' 
      }]
    });
    
  4. The browser's media UI observes the metadata change and requests the artwork.

  5. The browser commands the victim.com main frame to fetch the URL.

  6. The GET request is sent to https://victim.com/account/delete?confirm=true with the user's victim.com cookies and Sec-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.

The original report as published on the Chromium issue tracker. Images and videos are our own copies; raw HTML is shown as text. View it on Chromium issue tracker.

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

  1. An attacker embeds an iframe on a victim site.
  2. The iframe plays audible media to become the routed media session.
  3. The iframe sets Media Session artwork to a sensitive GET endpoint on the victim site.
  4. The browser's media UI requests the artwork.
  5. The browser commands the victim site's main frame to fetch the URL.
  6. 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.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site request forgery (CSRF)

The lesson behind this report.

Another site makes a signed-in user's browser perform an action they did not intend.