New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.
Starred by 2 users

Issue metadata

Status: Fixed
Closed: Feb 2018
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 1
Type: Bug-Security

Blocked on:
issue 808334

Sign in to add a comment

Issue 808825: WebVTT CORS bypass using ServiceWorker

Reported by, Feb 3 2018

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.119 Safari/537.36

Steps to reproduce the problem:
1. Go to
2. Reload the page

What is the expected behavior? does not have access to

What went wrong?
CORS check for WebVTT can be bypassed when same-origin resource is intercepted by SW and redirected to cross-origin resource. This repros after the fix of  issue 780435 , so this is a different bug.

Did this work before? N/A 

Chrome version: 64.0.3282.119  Channel: n/a
OS Version: OS X 10.13.3
Flash Version:

Comment 1 by, Feb 3 2018

Blockedon: 808334
Components: Blink>ServiceWorker Blink>Media>Video
Summary: WebVTT CORS bypass using ServiceWorker (was: WebVTT CORS bypass using SW)
We started enforcing origin restrictions here only relatively recently, in  Issue 633885 .

Bypass via ServiceWorker is mentioned in #3 of Issue 808334.

Comment 2 by, Feb 5 2018

Labels: Security_Severity-Medium ReleaseBlock-Stable
Status: Assigned (was: Unconfirmed)
Assigning medium severity, as I believe we have MIME-type restrictions on track files. If that turns out not to be the case, and this exposes more kinds of data cross-origin, we should bump the severity.

japhet@: Would you mind taking a look at this, since you added the CORS restrictions in the first place (no good deed... :) )? falken@ can probably help figure out what the right interaction with Service Workers ought to be.

Comment 3 by, Feb 5 2018

Project Member
Labels: -Pri-2 Pri-1

Comment 4 by, Feb 5 2018

Re #2: We don't have a MIME-restriction per-se, but we do require that the file starts with the exact text "WEBVTT" followed by SP, TAB, or LF:, meaning an attacker would need an injection in the file. Further exploitability discussion here:

Comment 5 by, Feb 6 2018

It seems to me the fix for  issue 633885  ( checks that CORS was on or the request URL is allowed to be requested.

With service workers the request URL origin and response URL origin can be different. So we likely must also check FetchResponseType like what added.

Comment 6 by, Feb 6 2018

Labels: M-65 Security_Impact-Stable

Comment 7 by, Feb 7 2018

Status: Started (was: Assigned)

Comment 8 by, Feb 9 2018

Project Member
The following revision refers to this bug:

commit c0bca399136db67de29a7ffae1ed802fd5b42768
Author: Matt Falkenhagen <>
Date: Fri Feb 09 04:08:29 2018

service worker: Disallow opaque responses for WebVTT.

WebVTT loading code was determining if a response was cross-origin by looking
at request URL. But a service worker may have intercepted the request and
provided a response from cross-origin.

Bug:  808825 
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_mojo
Change-Id: Ia121c0a8eae782de93d9777603426500a9709f8c
Reviewed-by: Tsuyoshi Horo <>
Reviewed-by: Kinuko Yasuda <>
Commit-Queue: Matt Falkenhagen <>
Cr-Commit-Position: refs/heads/master@{#535625}

Comment 9 by, Feb 12 2018

Any more changes expected or can we mark this as fixed? Thanks!

Comment 10 by, Feb 13 2018

M65 Stable promotion is coming VERY soon. Your bug is labelled as Stable ReleaseBlock, pls make sure to land the fix and request a merge  into the release branch ASAP. Thank you.

Comment 11 by, Feb 14 2018

I don't expect more code changes but I wanted to add tests that involve redirects and make sure things work. I ran into  issue 810288  while attempting that (which turned out to be a red herring).

Comment 12 by, Feb 14 2018

Status: Fixed (was: Started)
The tests at look passing locally so no further code changes are needed.

I'll mark this as Fixed.

I'm unclear whether this qualifies as a RBS that requires merging. I believe this bug has been in service worker since inception (Chrome 40-ish?), so it's not a recent regression. My inclination is to not merge as it could conceivably unstabilize stable late in the game.

Comment 13 by, Feb 14 2018

Project Member
The following revision refers to this bug:

commit 038e2d8e8775b6262ff5997b6f4a820702713106
Author: Matt Falkenhagen <>
Date: Wed Feb 14 08:42:28 2018

service worker: Add tests for cross-origin WebVTT responses with redirects.

This is a follow-up to:

Tests only; the code seems to work.

R=horo, kinuko

Bug:  808825 
Change-Id: I6b86a4dac159b754cfe5e6b92ac390c07de89ab3
Reviewed-by: Kinuko Yasuda <>
Commit-Queue: Matt Falkenhagen <>
Cr-Commit-Position: refs/heads/master@{#536679}

Comment 14 by, Feb 14 2018

Project Member
Labels: -Restrict-View-SecurityTeam Restrict-View-SecurityNotify

Comment 15 by, Feb 15 2018

Labels: M-66
Fix is in 66.0.3345.0. Per c#12 I don't intend to merge this, but let me know if you disagree.

Comment 16 by, Feb 16 2018

Labels: -ReleaseBlock-Stable -M-65

Comment 17 by, Feb 19 2018

Labels: reward-topanel

Comment 18 by, Feb 26 2018

Labels: -reward-topanel reward-unpaid reward-500
*** Boilerplate reminders! ***
Please do NOT publicly disclose details until a fix has been released to all our users. Early public disclosure may cancel the provisional reward. Also, please be considerate about disclosure when the bug affects a core library that may be used by other products. Please do NOT share this information with third parties who are not directly involved in fixing the bug. Doing so may cancel the provisional reward. Please be honest if you have already disclosed anything publicly or to third parties. Lastly, we understand that some of you are not interested in money. We offer the option to donate your reward to an eligible charity. If you prefer this option, let us know and we will also match your donation - subject to our discretion. Any rewards that are unclaimed after 12 months will be donated to a charity of our choosing.

Comment 19 by, Feb 26 2018

Congrats s.h.h.n.j.k@! The VRP panel decided to award $500 for this report - thanks!

Comment 20 by, Feb 27 2018

Labels: -reward-unpaid reward-inprocess

Comment 21 by, Mar 2 2018

Hmm, I think this vuln is more severe and $500 seems less. Since WebVTT doesn't care about response taint, I think we can use Range reponse from SW to  provide necessary prefix ("WEBVTT" followed by SP, TAB, or LF) and then
redirect further request to cross-origin HTML and get content.


Comment 22 by, Mar 2 2018

Alright, seems like setting range header in SW doesn't initiate further request from client. Sad :(

Comment 23 by, Mar 16 2018

Project Member
Labels: Merge-Request-66

Comment 24 by, Mar 16 2018

Project Member
Labels: -Merge-Request-66 Merge-Review-66 Hotlist-Merge-Review
This bug requires manual review: M66 has already been promoted to the beta branch, so this requires manual review
Please contact the milestone owner if you have questions.
Owners: cmasso@(Android), cmasso@(iOS), josafat@(ChromeOS), abdulsyed@(Desktop)

For more details visit - Your friendly Sheriffbot

Comment 25 by, Mar 19 2018

Labels: -Merge-Review-66 Merge-Rejected-66
Since this landed in Feb, no merge needed for 66.

Comment 26 by, Apr 17 2018

Labels: Release-0-M66

Comment 27 by, Apr 25 2018

Labels: CVE-2018-6099

Comment 28 by, Apr 25 2018

Labels: CVE_description-missing

Comment 29 by, May 23 2018

Project Member
Labels: -Restrict-View-SecurityNotify allpublic
This bug has been closed for more than 14 weeks. Removing security view restrictions.

For more details visit - Your friendly Sheriffbot

Comment 30 by, Dec 4

Labels: -CVE_description-missing CVE_description-submitted

Sign in to add a comment