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

Drop sensitive headers when following redirects #2013

Merged
merged 1 commit into from
Feb 7, 2022

Conversation

lpinca
Copy link
Member

@lpinca lpinca commented Feb 5, 2022

Do not forward the Authorization and Cookie headers if the redirect
host is different from the original host.

Do not forward the `Authorization` and `Cookie` headers if the redirect
host is different from the original host.
@lpinca
Copy link
Member Author

lpinca commented Feb 5, 2022

This is the topic of some recent CVEs like https://nvd.nist.gov/vuln/detail/CVE-2022-0235, and https://nvd.nist.gov/vuln/detail/CVE-2022-0155, but I will not create a security advisory for ws because

  1. Redirects are not followed by default.
  2. The issue was known when the feature was added (Add ability to follow redirects #1490).
  3. I do not think this fixes the issue because there might be other headers containing sensitive data, like X-AUTH-KEY, X-API-KEY, etc. It might actually break legitimate use cases.

@lpinca lpinca merged commit 6946f5f into master Feb 7, 2022
@lpinca lpinca deleted the drop/sensitive-headers branch February 7, 2022 19:21
lpinca added a commit that referenced this pull request Feb 7, 2022
Do not forward the `Authorization` and `Cookie` headers if the redirect
host is different from the original host.
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.

1 participant