Hello,

We detected XSS vulnerability when we use 301 or 302 redirections.

How to reproduce?
 
curl -I -k "http://example.com/test'""'>><svg/onload=alert\`ayman\`>" >
ayman.html

open ayman.html and you will get the popup!

I tried the below redirections and it's valid on all cases:

 - return 301 https://www.exampl.com$request_uri;
 
 - rewrite ^/(.*) https://www.example.com/$1 permanent;

Nginx version: 1.14.2

Is there a fix/workaround for this?

Thanks

Posted at Nginx Forum: 
https://forum.nginx.org/read.php?2,286600,286600#msg-286600

_______________________________________________
nginx mailing list
[email protected]
http://mailman.nginx.org/mailman/listinfo/nginx

Reply via email to