-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
CORS security: reflecting any origin header value when configured to * is dangerous #16193
Comments
What do you propose? |
Hi Alexander, thanks for your reply. Current CORS standards(both W3C CORS and WHATWG fetch standard) have a clear definition for the wildcard If a framework actively converts Therefore, I suggest frameworks to follow the standard definition of |
Agree. Do you want to make a pull request? |
Thanks. Yes, I'd love to make more contributions for this project. I made a pull request(#16198 ) just now, and hope it could be helpful for you. |
Fix #16193 to not reflect origin header for wildcard origins
When CORS policy is configured to *, current Yii2 CORS filter will actively convert it to reflect any Origin header value. This kind of behavior is dangerous and has caused many security problems in the past.
Some similar security issues:
cyu/rack-cors#126
https://nodesecurity.io/advisories/148
Some related blog posts:
http://blog.portswigger.net/2016/10/exploiting-cors-misconfigurations-for.html
https://ejj.io/misconfigured-cors/
The text was updated successfully, but these errors were encountered: