Inappropriate implementation in Media (CVE-2026-11106)
Chrome's HLS demuxer concatenates and decrypts cross-origin initialization segments with media segments when using AES-128 encryption, creating a padding and container-sniffing oracle. An attacker could leak cross-origin data byte-by-byte by observing whether a video element fires loadedmetadata or error.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 56 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 security team.
Overview: Chrome's HLS demuxer improperly concatenates and decrypts cross-origin initialization segments with media segments when using AES-128 encryption. This creates a padding and container-sniffing oracle that allows an attacker to leak cross-origin data byte-by-byte. The leak is achieved by observing the success or failure of container parsing via DOM events on a <video> element.
Affected files:
media/formats/hls/media_segment.ccmedia/filters/hls_data_source_provider.ccmedia/filters/hls_manifest_demuxer_engine.ccmedia/filters/hls_network_access_impl.ccmedia/formats/hls/media_playlist.ccmedia/formats/hls/types.ccmedia/filters/hls_rendition_impl.cc
Estimated timestamp from git blame: 2025-10-24
Root Cause
Per the HLS specification (RFC 8216 §4.3.2.4), METHOD=AES-128 "does not apply to Media Initialization Sections." However, Chromium's HLS implementation handles initialization and media segments by fetching them and appending them to a single buffer (HlsDataSourceStream::buffer_).
When HlsManifestDemuxerEngine::DetermineBitstreamContainer attempts to identify the container type, it extracts this combined buffer and passes it to MediaSegment::GetPlaintextStreamSource. If AES-128 encryption is enabled, this function calls crypto::aes_cbc::Decrypt() on the entire concatenated buffer at once.
Because the attacker can specify a cross-origin resource as the initialization segment (via #EXT-X-MAP and BYTERANGE) and provide their own attacker-controlled media segment, they control all but the first few bytes of the ciphertext. By manipulating the media segment to ensure the final block passes PKCS7 padding checks, they can force the demuxer to decrypt the combined buffer.
Potential Exploitation Mechanism
An attacker can construct a deterministic oracle to leak cross-origin data by exploiting the container sniffing logic. Below are the suggested steps an attacker would follow to trigger this vulnerability:
- Craft Playlist: The attacker creates an HLS playlist (
leak.m3u8) utilizing AES-128 encryption. The encryption key is provided via a relative path ordata:URI (which is marked askSafeOrigin, bypassing tainting checks inHlsNetworkAccessImpl::OnKeyFetch). - Target Selection: The playlist uses an
#EXT-X-MAPtag withBYTERANGE="1@0"pointing to the cross-origin target resource. This requests exactly one byte of the secret. - Media Segment Crafting: The playlist includes a standard media segment pointing to a 31-byte file on the attacker's server.
- Fetch and Concatenate: When the browser loads the playlist via a
<video>tag, the demuxer fetches the 1-byte init segment (via ano-corsrequest) and the 31-byte media segment, appending both to a single 32-byte buffer (two AES blocks). - Bypass Padding Check: The ciphertext consists of $C_0$ (1 secret byte + 15 controlled bytes) and $C_1$ (16 controlled bytes). The plaintext of the second block is $P_1 = D_k(C_1) \oplus C_0$. The attacker crafts $C_1$ such that $D_k(C_1)[15] \oplus C_0[15] = 0x01$. This forces the final decrypted byte ($P_1[15]$) to be
0x01. BoringSSL's PKCS7 validation will see a padding length of 1 and only check the last byte, completely ignoring the unknown byte in $P_1[0]$ and guaranteeing a successful decryption. - Container Magic Sniffing: The demuxer passes the successfully decrypted plaintext to
CheckBitstreamForContainerMagic, which inspects the first byte ($P_0[0] = D_k(C_0)[0] \oplus IV[0]$). - Oracle Feedback:
- If $P_0[0]$ equals
0x47(the MPEG-TS magic byte), initialization succeeds, and the<video>element eventually fires aloadedmetadataevent. - If $P_0[0] \neq 0x47$, initialization fails, returning
DEMUXER_ERROR_COULD_NOT_PARSE, and the<video>element fires anerrorevent.
- If $P_0[0]$ equals
- Sweeping the IV: The attacker creates 256
<video>tags pointing to playlists with different $IV[0]$ values. The browser caches the 1-byte init segment, making the sweep instantaneous. By observing which video tag firesloadedmetadata, the attacker determines the exact $IV[0]$ that resulted in0x47. - Offline Computation: The attacker calculates $D_k(C'_0)[0]$ offline for all 256 possible values of the first byte of $C'_0$ (since the key and the other 15 bytes are known) and compares it to $0x47 \oplus IV[0]$ to deduce the unknown cross-origin byte.
- Full Leak: The attacker repeats the process, incrementing the
BYTERANGEoffset to leak the entire file byte-by-byte.
While Opaque Response Blocking (ORB) protects HTML, JSON, and XML, this attack successfully leaks any cross-origin resource permitted by ORB, such as binary files or media assets.
Suggested Fix
The demuxer should strictly adhere to RFC 8216 §4.3.2.4 and refuse to decrypt initialization segments when AES-128 is specified. Initialization segments and media segments should be maintained in separate buffers, and the decryption routines in MediaSegment::GetPlaintextStreamSource should only ever be applied to the media segment data, never to the initialization segment data.
Evaluated with Chrome root at commit: 137d451a126685dd5010e6609db9f6d4a78d8234
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 HLS demuxer appends the initialization segment and media segment into a single buffer and then decrypts the entire buffer with AES-128, contrary to the HLS specification.
Impact
An attacker could leak any cross-origin resource permitted by Opaque Response Blocking, such as binary files or media assets, byte-by-byte.
What the attacker needed
Victim visits attacker's page; cross-origin resource is fetchable; resource is not blocked by ORB
The fix
The demuxer should refuse to decrypt initialization segments when AES-128 is specified and keep initialization and media segments in separate buffers.
How it was found
- Create an HLS playlist using AES-128 encryption with a key from a relative path or data URI.
- Use an EXT-X-MAP tag with a byte range pointing to a cross-origin target resource to request one byte.
- Include a media segment pointing to a small file on the attacker's server.
- Load the playlist in a video tag so the demuxer fetches and concatenates the init and media segments.
- Craft the media segment ciphertext so the final decrypted byte passes PKCS7 padding validation.
- Observe whether the video element fires loadedmetadata or error to determine the first byte of the decrypted plaintext.
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 loads encrypted streams, it should treat the setup data and the video data separately. Here, Chrome mixed them together and decrypted them as one block, so an attacker could use the success or failure of video loading to guess secret bytes from another website.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.