first commit
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

This commit is contained in:
2025-09-06 16:08:15 +08:00
commit 63285f61aa
2624 changed files with 88491 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
# YApi NoSQL注入导致远程命令执行漏洞
YApi是一个API管理工具。在其1.12.0版本之前存在一处NoSQL注入漏洞通过该漏洞攻击者可以窃取项目Token并利用这个Token执行任意Mock脚本获取服务器权限。
参考链接:
- <https://github.com/YMFE/yapi/commit/59bade3a8a43e7db077d38a4b0c7c584f30ddf8c>
## 漏洞环境
执行如下命令启动一个YApi v1.10.2服务:
```
docker compose up -d
```
环境启动后,访问`http://your-ip:3000`即可看到YApi首页。
## 漏洞复现
本漏洞的利用需要YApi应用中至少存在一个项目与相关数据否则无法利用。Vulhub环境中的YApi是一个即开即用、包含测试数据的服务器所以可以直接进行漏洞复现。
使用[这个POC](poc.py)来复现漏洞:
```
python poc.py --debug one4all -u http://127.0.0.1:3000/
```
![](1.png)