Closed Bug 1783550 Opened 3 years ago Closed 3 years ago

Universal CSRF Bypass With SameSite=Strict (When Angular Service Worker Is Running)

Categories

(Core :: DOM: Service Workers, defect)

Firefox 104
defect

Tracking

()

RESOLVED DUPLICATE of bug 1658869

People

(Reporter: realgam3, Unassigned)

Details

Attachments

(1 file)

3.60 MB, application/x-zip-compressed
Details
Attached file CSRF_Firefox_POC.zip

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36

Steps to reproduce:

Firefox 104 and maybe other versions as well is vulnerable to Universal CSRF Bypass Even when SameSite=Strict when Angular Service Worker is running.
I've created a simple app and a video to demonstrate the issue.

To Reproduce On The Demo App:

You can also watch the video CSRF-Firefox-POC.mp4 it will show the whole process.

Actual results:

Because of the service worker, Firefox thinks that the it is the same-site.
The jwt cookie (SameSite=Strict) exist when the post request triggered to https://site.firefox-poc.realgame.co.il/api/invite.

Expected results:

Firefox should have still act as it's not the same site.
The jwt cookie (SameSite=Strict) need to be removed when the post request triggered to https://site.firefox-poc.realgame.co.il/api/invite.

Group: firefox-core-security → dom-core-security
Component: Untriaged → DOM: Service Workers
Product: Firefox → Core

Thanks for reporting this issue, which was originally an issue in the spec. That's now been resolved but we haven't been able to update our implementation to match yet.

This is a problem when the site relies solely on SameSite cookies for CSRF defense. If sites continue to use traditional CSRF mitigations they will still be protected despite this Cookie failure. It's important that sites do so because not all browsery things support SameSite cookies.

Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → DUPLICATE
Group: dom-core-security
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: