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

Forwarded, X-Forwarded-* headers are trusted by default. #1772

Open
damooo opened this issue Nov 9, 2023 · 2 comments
Open

Forwarded, X-Forwarded-* headers are trusted by default. #1772

damooo opened this issue Nov 9, 2023 · 2 comments

Comments

@damooo
Copy link
Contributor

damooo commented Nov 9, 2023

Description

Currently server trust Forwarded and X-Forwrded-* headers by default when reconstructing an uri. That can be security issue when setting with reverse proxy. For example python modwsgi provides config trusted_proxy_headers to explicitly enable them.

See also : pallets/werkzeug#609

@joachimvh
Copy link
Member

While it would be good to have settings for that, what actually is the security risk in the case of the server?

@damooo
Copy link
Contributor Author

damooo commented Nov 9, 2023

In some setups, someone can set arbitrary headers, and mislead the server to reconstruct different uri than what it is supposed to be.

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

2 participants