RAGFlow Insecure Token Generation Vulnerability Allowing Authentication Bypass

Vulnerability

A vulnerability in RAGFlow, an open-source Retrieval-Augmented Generation engine, allows for an authentication bypass through predictable token generation. In versions prior to 0.22.0, the API key and beta token (used for assistant/agent sharing) are generated using the same URLSafeTimedSerializer with predictable inputs. This flaw enables an unauthorized user to derive a personal API key from the beta token by exploiting the shared assistant/agent URL. The vulnerability grants full control over the assistant/agent owner's account.

Impact

Exploitation of this vulnerability leads to authentication bypass, allowing an attacker to gain unauthorized access to an account and its associated privileges.

Reproduction

To reproduce this vulnerability, first obtain a beta token by sharing an assistant/agent URL. The beta token can be decoded to extract a UUIDv1, which contains a predictable timestamp. This timestamp can be manipulated to derive the corresponding API key, which can then be used to access the account.

Remediation

Users are advised to update to RAGFlow version 0.22.0 or later, where this vulnerability has been fixed.

Added: Dec 31, 2025, 10:18 PM
Updated: Dec 31, 2025, 10:18 PM

Vulnerability Rating

Custom Algorithm
spread
0.0
impact
7.5
exploitability
6.0
remediation
0.0
relevance
1.7
threat
6.4
urgency
2.9
incentive
1.7

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.