nginx 配置错误而导致目录遍历漏洞

- AV AC AU C I A
发布: 2025-04-13
修订: 2025-04-13

nginx是一款高性能的web服务器,使用非常广泛,其不仅经常被用作反向代理 在nginx中开启autoindex,配置不规范而造成目录遍历漏洞 配置如下: &lt;code&gt;server { listen 80; server_name sebug.net; index index.htm index.html; root /home/wwwroot/www; access_log off; location /paper { alias /home/wwwroot/paper/; autoindex on; } }&lt;/code&gt; 注意 这里/home/wwwroot/paper/; 有个/ 当你浏览http://sebug.net/paper/,正常情况应该遍历/home/wwwroot/paper/这个目录,但是如果访问http://sebug.net/paper../, 这个的话就会遍历/home/wwwroot/这个目录了 nginx是一款高性能的web服务器,使用非常广泛,其不仅经常被用作反向代理 在nginx中开启autoindex,配置不规范而造成目录遍历漏洞 配置如下: <pre class="prettyprint linenums">server { listen 80; server_name sebug.net; index index.htm index.html; root /home/wwwroot/www; access_log off; location /paper { alias /home/wwwroot/paper/; autoindex on; } }</pre> 注意 这里/home/wwwroot/paper/; 有个/ 当你浏览http://sebug.net/paper/,正常情况应该遍历/home/wwwroot/paper/这个目录,但是如果访问http://sebug.net/paper../, 这个的话就会遍历/home/wwwroot/这个目录了 nginx(Tested at 1.1.10) sebug建议: 使用如下配置 location /paper { alias /home/wwwroot/paper; 或 location /paper/ { alias...

0%
暂无可用Exp或PoC
当前有0条受影响产品信息