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

V14.4.6 potential misleading advice in Referrer-Policy requirement #861

Closed
elarlang opened this issue Oct 25, 2020 · 10 comments
Closed

V14.4.6 potential misleading advice in Referrer-Policy requirement #861

elarlang opened this issue Oct 25, 2020 · 10 comments
Assignees

Comments

@elarlang
Copy link
Collaborator

elarlang commented Oct 25, 2020

Current requirement 14.4.6

14.4.6 Verify that a suitable "Referrer-Policy" header is included, such as "no-referrer" or "same-origin".

From this requirement one may interpret, that only no-referrer and same-origin are accepted values for Referrer-Policy, but this is not true. As there are quite many suitable values I think it's not smart to list all of them here.

So first recommendation is - to just strip them off:

14.4.6 Verify that a suitable "Referrer-Policy" header is included.

or to add something like "to avoid sensitive information leakage with Referer header" (and this is meaning, not actual wording for requirement).

@jmanico
Copy link
Member

jmanico commented Oct 26, 2020 via email

@elarlang
Copy link
Collaborator Author

elarlang commented Dec 7, 2020

Any other opinions or I move on (PR) with that?

@Sjord
Copy link
Contributor

Sjord commented Dec 7, 2020

I think it is important to qualify what "suitable" means here. So I think it needs an additional sentence as to what the goal is of the referrer policy:

Verify that a suitable "Referrer-Policy" header is included, to avoid exposing sensitive information in the URL through the Referer header.

@jmanico
Copy link
Member

jmanico commented Dec 7, 2020 via email

@elarlang
Copy link
Collaborator Author

elarlang commented Dec 9, 2020

If we want to have this longer description, then I would add "untrusted parties". Using @Sjord proposal as a base:

Verify that a suitable "Referrer-Policy" header is included, to avoid exposing sensitive information in the URL through the Referer header to untrusted parties.

What is danger for me here - if we kind of propose to use no-referrer, it's bad for site own monitoring and analytics tools which needs Referer header information.

In case, when application domain name is "public", then I personally recommend to use strict-origin-when-cross-origin.

But I would like to avoid using any examples in requirement itself, otherwise we are back to the problem why I made this issue.

@Sjord
Copy link
Contributor

Sjord commented Dec 16, 2020

Perhaps a referrer policy only makes sense for pages that load (third-party) resources. An API may not need a referrer policy at all. What a "suitable" referrer policy is, depends on what the site serves and whether there is sensitive information in the URL.

@elarlang
Copy link
Collaborator Author

elarlang commented Dec 16, 2020

Perhaps a referrer policy only makes sense for pages that load (third-party) resources. An API may not need a referrer policy at all. What a "suitable" referrer policy is, depends on what the site serves and whether there is sensitive information in the URL.

Additionally to loading resources from another pages (let's say classical HTML page), Referer is sent at least:

  • on clicking links
  • loading "resources by resources" - font files from css, something loaded by SVG etc.

"Loading resources" can be result of HTML injection as well - let's say attacker can put some hidden image samewhere and then can track, from what URL which user and when is loading it. Not sending Referer in this case does not fix the issue, but gives less information.

If you can wordsmith it, we can put it to the requirement, but at the same time I'm afraid it may miss some edge-cases with those restrictions.

@jmanico
Copy link
Member

jmanico commented Mar 11, 2021

I prefer to keep this simple. I would like to stick with this and a little addition to state this is only needed for web clients. I think a PR is good now if you agree.

Verify that a suitable "Referrer-Policy" header is included for web based clients, to avoid exposing sensitive information in the URL through the Referer header to untrusted parties.

@elarlang
Copy link
Collaborator Author

I think this proposal works better without "web based clients" - it's confusing (what it is exactly) and does not give anything extra.

Verify that a suitable "Referrer-Policy" header is included to avoid exposing sensitive information in the URL through the Referer header to untrusted parties.

@jmanico
Copy link
Member

jmanico commented Mar 12, 2021

I agree.

I think this proposal works better without "web based clients" - it's confusing (what it is exactly) and does not give anything extra.

Verify that a suitable "Referrer-Policy" header is included to avoid exposing sensitive information in the URL through the Referer header to untrusted parties.

Agreed

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

3 participants