-
Notifications
You must be signed in to change notification settings - Fork 37
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
Remove X-Forwarded-For header special processing #103
Conversation
…(for IPv4 machine only)
i think the issue should be solved by checking the actual trusted list of IPs. |
This problem does not exist in NGINX But NAXSI in its current implementation additionally tries to check the X-Forwarded-For header itself and, regardless of the settings of trusted hosts, passes requests if the header contains a value from IgnoreCIDR / IgnoreIP. For example, in our organization, internal addresses are not checked by NAXSI. Specified IgnoreCIDR 192.168.0.0/16, 172.16.0.0/16 |
Probably i'm still stuck with issues that afflicted very old versions of nginx. |
I have made a special release due this security bug. i have requested a CVE at your name :) @lubomudr |
Thank you |
Hi
The special handling of X-Forwarded-For in runtime.c is a security hole and VERY DANGEROUS.
If the ngx_http_realip_module module configuration is enabled, the NGINX $remote_addr variable is replaced with X-Forwarded-For if (and only if) the IP packet came from any trusted host in set_real_ip_from.
If the IP packet arrived from any other hosts or the ngx_http_realip_module module is not enabled, processing of the X-Forwarded-For header is ignored.
Handling of the X-Forwarded-For header must be completely transparent to NAXSI