labml icon indicating copy to clipboard operation
labml copied to clipboard

Add check for Host Authorization middleware

Open p8 opened this issue 3 years ago • 1 comments

The Host Authorization middleware protects against DNS rebinding. This middleware is primarily targeted at the development environment:

It is included in the development environment by default ... In other environments Rails.application.config.hosts is empty and no Host header checks will be done. https://github.com/rails/rails/pull/33145

If someone decides to call config.hosts.clear because it's "only development", we should warn them they are vulnerable to DNS rebinding.

p8 avatar Aug 23 '21 09:08 p8

Hi @p8, thank you for putting this together!

I am pretty sure Brakeman doesn't even look at config/development.rb, though. Only config/production.rb. :thinking:

presidentbeef avatar Sep 18 '21 05:09 presidentbeef