Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

caches global property should not be available in Dedicated/Shared WorkerGlobalScope with {credentials: 'omit'} #1721

Open
BlobTheKat opened this issue Jun 8, 2024 · 1 comment

Comments

@BlobTheKat
Copy link

Exposing access to caches with {credentials: 'omit'} could allow an untrusted worker running on a web page to overwrite existing cache entries, where it could inject an arbitrary script that would be run the next time the page is loaded. Such a script would then have not just one-time but permanent access to the page's credentials.

Currently both localStorage and indexedDB are inaccessible for workers with this option, this should also be made the case for caches

@BlobTheKat BlobTheKat changed the title caches global property should not be available in Dedicated/Shared WorkerGlobalScope with {credentials: 'omit'} caches global property should not be available in Dedicated/Shared WorkerGlobalScope with {credentials: 'omit'} Jun 8, 2024
@mkruisselbrink
Copy link
Collaborator

I agree that all storage APIs should behave the same, so if there are cases where localstorage/indexedDB are not available cache storage probably should be rejecting as well; i.e. opaque origins would be one such case. I'm not sure where this behavior is defined for credentials: omit for indexedDB and localStorage?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants