Inappropriate implementation in Media (CVE-2026-11176)
A logic flaw in the HTMLMediaElement's opacity check allows a page to bypass cross-origin protections by switching the preload attribute to 'none' after a load has started. An attacker could then read detailed demuxer error messages and observe progress events for cross-origin media, creating an information leak.
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 logic flaw in HTMLMediaElement allows a page to bypass cross-origin information leak protections by dynamically switching the preload attribute to 'none' after a load has started. This causes MediaShouldBeOpaque() to prematurely return false, exposing detailed demuxer error messages and progress events for cross-origin resources.
Affected files:
third_party/blink/renderer/core/html/media/html_media_element.ccthird_party/blink/renderer/platform/media/web_media_player_impl.ccmedia/filters/demuxer_manager.ccthird_party/blink/renderer/platform/media/multi_buffer_data_source.cccontent/renderer/media/batching_media_log.ccthird_party/blink/renderer/platform/media/resource_multi_buffer_data_provider.cc
Estimated timestamp from git blame: 2018-11-16
Summary
A potential logic error in HTMLMediaElement::MediaShouldBeOpaque() allows a malicious page to leak sensitive information from cross-origin media resources. By initiating a media load and then programmatically switching the preload attribute to none before the metadata is received, an attacker can bypass the renderer-side opacity check. This check is designed to redact detailed error messages and suppress progress events for cross-origin media lacking CORS headers to prevent information leaks.
Technical Details
HTMLMediaElement::MediaShouldBeOpaque() determines whether a media resource's details should be hidden from the renderer's script. It is implemented as follows:
bool HTMLMediaElement::MediaShouldBeOpaque() const {
return !IsMediaDataCorsSameOrigin() && ready_state_ < kHaveMetadata &&
EffectivePreloadType() != WebMediaPlayer::kPreloadNone;
}
The condition EffectivePreloadType() != WebMediaPlayer::kPreloadNone appears to assume that if preload is none, no network loading or parsing is actively occurring. However, this assumption breaks if the load was already started before the attribute was changed.
When a page sets the src attribute, the internal flag ignore_preload_none_ is reset to false (in ParseAttribute), and the load algorithm is invoked. If an attacker then sets element.preload = 'none' (e.g., within a loadstart event listener):
EffectivePreloadType()returnskPreloadNonebecause it reads the new attribute andignore_preload_none_isfalse.- This change propagates to the
MultiBufferDataSourceto adjust buffering limits, but it does not actively abort the existing network fetch or the demuxer parsing process. - Because
EffectivePreloadType()is nowkPreloadNone,MediaShouldBeOpaque()evaluates tofalse.
This bypasses protections in two key areas:
- Error Message Redaction: In
MediaLoadingFailed(), if a cross-origin load fails (e.g., a 404, or demuxer failing to parse an HTML document), the detailed error string (retrieved from the media player viaGetErrorMessage()) is usually replaced with an empty string ifMediaShouldBeOpaque()is true. Because the check evaluates to false, the sensitive demuxer or network diagnostic string is passed through and exposed via theMediaError.messageproperty. - Progress Event Suppression: In
ProgressEventTimerFired(),progressandstalledevents are normally suppressed for opaque media. The bypass allows these events to fire, creating a timing side-channel.
Impact
This issue constitutes a cross-origin information leak (XS-Leak). It enables:
- A 200-vs-4xx status oracle for cross-origin resources (by distinguishing error messages).
- Exposure of internal demuxer diagnostics for cross-origin resources that pass ORB (Opaque Response Blocking) sniffing but fail subsequent media parsing.
- A timing side-channel via progress events for opaque media loads.
Potential Reproduction Steps
Note: These steps are suggested as we do not have execution capabilities to run a PoC.
- On an attacker-controlled page, create an
<audio>element withpreload="metadata"and nocrossoriginattribute. - Attach a
loadstartevent listener that immediately sets the element's preload attribute to none:audio.addEventListener('loadstart', () => { audio.preload = 'none'; }); - Attach an
errorlistener to inspectaudio.error.messageand aprogresslistener to observe event timing. - Set
audio.srcto a cross-origin URL (e.g., an endpoint returning JSON or a 404 status). - Observe that the
errorlistener receives an unredacted demuxer error string, and progress events fire.
Suggested Fix
MediaShouldBeOpaque() should not rely solely on EffectivePreloadType() != kPreloadNone to determine if a load is active. A more robust approach would be to check the actual network state (e.g., network_state_ == kNetworkLoading) or maintain a specific flag indicating whether an active fetch/parse operation for opaque media is underway, regardless of subsequent changes to the preload attribute.
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 function MediaShouldBeOpaque() incorrectly assumes that if the preload attribute is 'none', no network loading is occurring, but it does not account for a load that was already started before the attribute was changed.
Impact
This could allow an attacker to determine whether a cross-origin resource exists (200 vs 4xx) and to obtain internal demuxer diagnostics, as well as to use progress events as a timing side-channel, though the report notes these steps are suggested and not yet proven.
What the attacker needed
Attacker-controlled page; victim visits the page; cross-origin media resource
The fix
The check should be changed to rely on the actual network state or a dedicated flag indicating an active fetch or parse, rather than on the preload attribute.
How it was found
- Create an audio element with preload set to metadata and no crossorigin attribute.
- Add a loadstart event listener that sets the preload attribute to none.
- Add error and progress listeners to inspect error messages and event timing.
- Set the audio source to a cross-origin URL.
- Observe that the error message is not redacted and progress events fire.
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 web page loads media from another site, the browser normally hides details like error messages to prevent leaking information. This report shows that by changing a setting called 'preload' after loading begins, a malicious page can trick the browser into revealing those details. That could let an attacker learn things about other sites' resources, such as whether a file exists or its size.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.