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

Mitigate Host Header cache-poisoning attacks #1397

Closed
wants to merge 1 commit into from

Conversation

stevendanna
Copy link
Contributor

Previously, a request such as:

curl -H Host:evil.com http://chef-server.dev

would create a response where the Location was set to the user
provided Host header.

Location: https://evil.com/

If this 301 was erroneously cached, it may then be served to another
user, whose traffic might be redirected to an attacker-controlled
server.

This PR changes the nginx configuration so that we use the server_name
rather than the user-provided Host header when generating redirects.

Signed-off-by: Steven Danna [email protected]

Previously, a request such as:

    curl -H Host:evil.com http://chef-server.dev

would create a response where the Location was set to the user
provided Host header.

    Location: https://evil.com/

If this 301 was erroneously cached, it may then be served to another
user, whose traffic might be redirected to an attacker-controlled
server.

This PR changes the nginx configuration so that we use the server_name
rather than the user-provided Host header when generating redirects.

Signed-off-by: Steven Danna <[email protected]>
@stevendanna stevendanna requested a review from a team October 9, 2017 13:03
@stevendanna
Copy link
Contributor Author

Alternative to #1398 for discussion

Copy link
Contributor

@markan markan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While this seems fine, I think I prefer the approach provided in #1398

@stevendanna
Copy link
Contributor Author

Gonna close this one.

@stevendanna stevendanna deleted the ssd/SUSTAIN-716-3 branch November 27, 2017 10:16
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.

2 participants