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

Document the problem with cross-origin headers #1186

Open
annevk opened this issue Mar 4, 2021 · 3 comments
Open

Document the problem with cross-origin headers #1186

annevk opened this issue Mar 4, 2021 · 3 comments

Comments

@annevk
Copy link
Member

annevk commented Mar 4, 2021

At various times it's suggested that Sec-* or other new headers should be able to bypass the CORS preflight requirement. The problem with this is that servers have limits on the total number of bytes used by headers and the closer browser- and attacker-controlled headers get to this limit the easier it would be to steal infer confidential information, such as cookies. (This is perhaps mitigated somewhat by partitioning, but the scopes are not the same, and partitioning for cookies is fiddly.)

#1000 contained some prior discussion on this. WICG/client-hints-infrastructure#100 also raises this.

@johnathan79717
Copy link
Contributor

Another problem we ran into when trying to implement Private Network Access for navigation requests is that we would need to send preflight requests before navigating to a less-public IP address space. Navigation requests usually come with a long Accept header that would fail the 128 character length limit for safelisted headers.

I couldn't find any straightforward way to get around this other than adjusting the 128 limit to something larger say 256 globally. Would this make attacking a lot easier? Only exempting requests to less-public IP address space doesn't look easy as it might be complicated to pass this information down to the algorithms that determine the safelisted-ness. Is there another way to get around this restriction?

@annevk
Copy link
Member Author

annevk commented Jan 15, 2024

Is there a dedicated issue tracking that? Navigation requests are a bit distinct.

@johnathan79717
Copy link
Contributor

Here's the issue in Private Network Access.

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

No branches or pull requests

2 participants