Side-channel information leakage in Media (CVE-2026-8017)
The HLS demuxer in Chromium fetches EXT-X-KEY URIs with credentials by default when the crossorigin attribute is omitted, processing opaque responses as AES keys. This creates observable side channels through decryption error events, potentially allowing attackers to leak the length of cross-origin responses or verify guesses of 16/32-byte secrets.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 37 days
Project Fortify, an experimental security project, has identified the following potential security issue.
Overview: The HLS demuxer fetches EXT-X-KEY URIs with credentials by default when the crossorigin attribute is omitted from a video element, processing the opaque response as an AES key. This creates observable side channels through decryption error events, potentially allowing attackers to leak the length of cross-origin responses or verify guesses of 16/32-byte secrets.
Affected files:
media/formats/hls/media_playlist.ccmedia/filters/hls_network_access_impl.ccmedia/formats/hls/media_segment.ccthird_party/blink/renderer/platform/media/web_media_player_impl.cc
Estimated timestamp from git blame: 2025-09-03
The built-in HLS demuxer in Chromium contains a potential vulnerability that allows for cross-origin information leaks. When processing an #EXT-X-KEY tag in an HLS manifest, the demuxer resolves the URI and fetches the key using the <video> element's CORS mode.
If the crossorigin attribute is not specified on the video element, the mode defaults to RequestMode::kNoCors with CredentialsMode::kInclude. Consequently, requests for the AES key will include SameSite=None cookies. If the response is not blocked by Opaque Response Blocking (ORB)—for instance, if it lacks a protected Content-Type and nosniff header—the raw bytes of the opaque response body are passed directly to the C++ media stack and used as an AES key (MediaSegment::EncryptionData::ImportKey).
This behavior creates two potential side-channel oracles observable via the <video> element's JavaScript error event:
- Length Oracle: In
media/formats/hls/media_segment.cc,KeyIsValidSize()requires the key to be exactly 16 or 32 bytes. If the cross-origin response is any other length, the demuxer immediately fails (kFailedToDecryptSegment), triggering an observable error event. - Verification Oracle: If the length is exactly 16 or 32 bytes, the implementation attempts to decrypt the segment using
crypto::aes_cbc::Decrypt. This function relies on BoringSSL'sEVP_DecryptFinal_ex2, which enforces PKCS#7 padding validation. Because the attacker controls the ciphertext (the segment data) and the IV, they can craft a ciphertext that decrypts to valid PKCS#7 padding only if their guessed key matches the actual cross-origin response. An incorrect guess results in invalid padding ~99.6% of the time, throwing a decryption error and an observable<video>error event. A correct guess succeeds the padding check, altering the observable state.
Potential Attacker Steps
Note: These are suggested steps based on static code analysis; our tooling agent does not yet have the ability to run or verify exploit code.
- An attacker creates a webpage hosting a
<video>element without acrossoriginattribute. - The video source points to an attacker-controlled HLS playlist (
.m3u8). - The playlist contains an
#EXT-X-KEYtag pointing to a target cross-origin endpoint (e.g.,http://victim.com/secret). - The playlist points to an attacker-crafted encrypted media segment.
- The attacker uses JavaScript to monitor the
<video>element forerrorevents. - By repeatedly changing the video source to use different crafted ciphertexts, the attacker can use the padding validation as a 1-bit verification oracle to systematically brute-force 16- or 32-byte secrets stored on the cross-origin endpoint.
Suggested Fix
Cryptographic key material should never be sourced from an opaque, cross-origin response.
To fix this, the HLS implementation should verify that the response used for #EXT-X-KEY does not taint the origin. In media/filters/hls_network_access_impl.cc (OnKeyFetch), check if the HlsDataSourceStream was flagged with WouldTaintOrigin(). If it was, the key fetch should be rejected and an error propagated. Alternatively, enforce that #EXT-X-KEY fetches strictly require a successful CORS preflight/response, regardless of the media element's overall crossorigin state.
Evaluated with Chrome root at commit: a9cbf6e8b275fe4147435aa905f3b7f5a656f5f0
Results from 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 HLS demuxer uses opaque cross-origin responses as AES keys without checking if the response would taint the origin, and decryption errors are observable.
Impact
An attacker could leak the length of cross-origin responses or verify guesses of 16/32-byte secrets, but the exploit is limited by Opaque Response Blocking and requires the response to lack a protected Content-Type and nosniff header.
What the attacker needed
Victim visits attacker's webpage; attacker controls HLS playlist; target endpoint returns non-protected content; cookies sent with request
The fix
The HLS implementation should verify that the response used for #EXT-X-KEY does not taint the origin, rejecting the key fetch if it does, or enforce that #EXT-X-KEY fetches strictly require a successful CORS preflight/response.
How it was found
- An attacker creates a webpage hosting a <video> element without a crossorigin attribute.
- The video source points to an attacker-controlled HLS playlist (.m3u8).
- The playlist contains an #EXT-X-KEY tag pointing to a target cross-origin endpoint.
- The playlist points to an attacker-crafted encrypted media segment.
- The attacker uses JavaScript to monitor the <video> element for error events.
- By repeatedly changing the video source to use different crafted ciphertexts, the attacker can use the padding validation as a 1-bit verification oracle to systematically brute-force 16- or 32-byte secrets stored on the cross-origin…
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 video player needs a decryption key, it normally fetches it from a server. If the video element lacks a crossorigin attribute, the browser sends cookies and treats the response as opaque, meaning JavaScript cannot read it. The bug is that the player still uses the raw bytes as a key, and errors during decryption can be observed, letting an attacker guess the key or its length.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.