Inappropriate implementation in Media (CVE-2026-9989)
The HLS demuxer classified decryption key URIs as same-origin using a string check that disagreed with how the URL library actually resolves them, so a crafted key URI could point at another origin. An attacker could then have the player fetch a cross-origin resource with the victim's cookies and use playback success as an oracle to leak that data.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 14 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. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.
Overview: A URL parser differential in the HLS demuxer allows cross-origin decryption keys to be incorrectly classified as same-origin. This bypasses security checks intended to prevent cross-origin key oracle attacks, potentially allowing an attacker to leak sensitive data from other origins.
Affected files:
media/formats/hls/media_playlist.ccmedia/filters/hls_network_access_impl.ccmedia/formats/hls/tags.ccmedia/formats/hls/types.cc
Estimated timestamp from git blame: Unknown (Google3 checkout)
Summary
The HLS demuxer implementation in Chromium contains a logic flaw in how it classifies the origin of decryption keys specified in #EXT-X-KEY tags. Specifically, the check used to identify same-origin (path-only) URLs is inconsistent with how GURL::Resolve actually resolves those URLs. This inconsistency can be exploited to trick the demuxer into using a cross-origin resource as an AES decryption key without triggering the required security errors.
Root Cause Analysis
In media/formats/hls/media_playlist.cc, a key URI is classified as kSafeOrigin (safe to use even if the stream becomes tainted) if it does not start with // and does not have a scheme:
// media/formats/hls/media_playlist.cc:255
} else if (!declared_uri_value.starts_with("//") &&
!GURL(declared_uri_value).has_scheme()) {
key_location = MediaSegment::EncryptionData::KeyLocation::kSafeOrigin;
}
There are at least two ways to bypass this check on non-Windows platforms (Linux, macOS, Android, ChromeOS):
-
Backslash Differential: A URI starting with
/\(e.g.,URI="/\\victim.com/api/token").- The
starts_with("//")check fails. GURL("/\\victim.com/...").has_scheme()returns false because it lacks a colon and is invalid as an absolute URL.- However,
GURL::Resolve(viaurl::ResolveRelative) treats both/and\as slashes when identifying protocol-relative URLs. It resolves this tohttps://victim.com/api/token.
- The
-
Leading Whitespace: A URI starting with whitespace (e.g.,
URI=" //victim.com/token").- The
starts_with("//")check fails. GURLtrims leading whitespace during resolution but not necessarily in the string comparison above, leading to a similar differential.
- The
Exploitation Potential (Suggested Steps)
An attacker could potentially use this to leak cross-origin data (e.g., an authentication token or CSRF secret) from a site where the user is logged in:
- Host a malicious HLS playlist on
https://attacker.comwith a key URI like"/\\victim.com/api/token". - When the user loads the playlist, the demuxer incorrectly marks the key as
kSafeOriginbut fetches it fromvictim.comwith the user's cookies. - In
media/filters/hls_network_access_impl.cc:62, the security checkif (stream->would_taint_origin() && (stream->DidRedirect() || !safe_key))is bypassed becausesafe_keyis true. - The cross-origin response is imported as the AES-128 key.
- The attacker provides media segments that only decode correctly if certain guesses about the key (the victim's data) are correct, effectively using the player as a decryption oracle to leak the data.
Note: On Windows, GURL often identifies leading \ as a UNC path and assigns a file: scheme, which may mitigate the backslash variant but potentially not the whitespace variant.
Suggested Fix
Instead of performing string-based heuristic checks on the raw declared_uri_value, the demuxer should compare the origin of the resolved resource_uri with the origin of the playlist_uri. If they do not match, the key should be marked as kUnsafeOrigin regardless of the input string's format.
Evaluated with Chrome root at commit: b3153093eb3c78c3e88ccf562bcbc20437a04b0e
Results so far have been promising, but there can be wrong deductions. Feel free to adjust as follows:
- If you are familiar with the severity guidelines, you may adjust the severity.
- If this is a false positive, and there's no work to be done, please close as WAI.
- If there is work to do here but not a vulnerability, please change the issue type to Task/Bug/FR.
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
The demuxer decided whether a key URI was same-origin with a string heuristic (no leading double slash, no scheme) instead of comparing the resolved URL's origin, so inputs like a leading backslash or whitespace resolved to a different origin while still being marked safe.
Impact
An attacker could potentially leak cross-origin data such as an authentication token or CSRF secret from a site where the user is logged in, though on Windows the backslash variant may be mitigated.
What the attacker needed
Victim loads attacker's HLS playlist; victim logged in to target site; non-Windows platform for backslash variant
The fix
The demuxer should compare the origin of the resolved key URL with the playlist's origin and mark mismatches as unsafe, rather than using string heuristics.
How it was found
- Host a malicious HLS playlist whose key URI is crafted to resolve to the victim origin.
- The victim loads the playlist and the demuxer marks the key as safe-origin but fetches it from the victim with the user's cookies.
- The cross-origin response is used as the AES key, bypassing the taint check.
- The attacker serves segments that only decode if guesses about the victim's data are correct, leaking it as an oracle.
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.
A web page can normally only read data from its own site, not from other sites where you are logged in. This report says a media player component could be tricked into fetching a decryption key from another site and then revealing, bit by bit, whether its guesses about that secret data were right. The mistake was that a quick text check and the real URL parser disagreed about what counted as the same site.
What is CORS?
A permissive cross-origin policy lets another site read responses with the user's credentials.