RAGFlow
CVE-2025-69286
HIGH
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObtain shared assistant/agent URL
-
DeliveryExtract embedded beta share token
-
ExploitDerive owner API key from predictable serializer
-
ExecutionAuthenticate as account owner
-
ImpactFull control of owner's data and account
Vulnerability Assessment
| Weakness |
CWE
|
| Exploitation Conditions | Exploitation requires that the target RAGFlow instance (version < 0.22.0) has at least one shared assistant/agent, and that the attacker obtains that share URL - the beta share token embedded in it is deterministically derivable from the tenant_id via the predictable |
| Impact | This is a genuine high-priority issue, not a CVSS-inflated one. The CVSS 4.0 base score of 8.9 (AV:N/AC:L/AT:N/PR:N/UI:N with VC:H/VI:H/VA:H) reflects a remotely reachable, low-complexity flaw requiring no authentication, and the source diff corroborates the mechanism: pre-0.22.0 |
| Exploit ScenarioDerived | An attacker is given or discovers the public share URL for a RAGFlow assistant/agent, which contains the beta share token. Because tokens are derived deterministically from the tenant_id via a predictable |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 23, 2026
RAGFlow versions prior to 0.22.0 generate API keys and beta assistant/agent share tokens with a predictable scheme, letting anyone who holds a shared assistant or agent URL derive the owner's personal API key and take full control of their account. Exploitation is network-reachable and requires no authentication or user interaction (CVSS 4.0 8.9; independent CVSS 3.1 assessment AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H), with the only practical prerequisite being a valid share link from an instance that exposes shared assistants. Publicly available exploit code exists (the GitHub security advisory GHSA-9j5g-g4xm-57w7 is referenced as an exploit source) and a vendor fix is available in 0.22.0, but there is no confirmation of active exploitation (not in CISA KEV) at time of analysis.
RemediationAI
Upgrade to RAGFlow 0.22.0 or later, which replaces the predictable tenant_id-seeded URLSafeTimedSerializer with secrets.token_urlsafe(32); the upstream fix is commit a3bb4aadcc3494fb27f2a9933b4c46df8eb532e6 and the vendor advisory is https://github.com/infiniflow/ragflow/security/advisories/GHSA-9j5g-g4xm-57w7 (Vendor-released patch: 0.22.0). Because the token derivation is deterministic from the tenant_id, patched software alone is not sufficient if old tokens remain valid - after upgrading, rotate all API keys and regenerate every assistant/agent share link so previously derived or harvested values are invalidated, and audit logs for unexpected use of API keys belonging to share-link owners. If immediate upgrade is not possible, the most effective compensating control is to stop distributing assistant/agent share URLs outside the trust boundary (do not embed them in public pages, chat clients, or ticketing systems) and to revoke or regenerate existing shared links, which removes the attacker's required input; this has the operational trade-off of disabling the share feature for external users, and it is a mitigation rather than a fix because any link already leaked remains sufficient to derive the key. Restricting network reachability of the RAGFlow API (do not expose it directly to the internet; place it behind authenticated reverse proxy or VPN) reduces exposure but does not address the derivation itself if any authorized-but-lower-privileged user can obtain a share link. Note that API key rotation before patching provides only temporary relief, since the new key is generated by the same predictable function and remains derivable from the same tenant_id.
Affects your stack
Find out whether the stacks and servers you run are on an affected version.
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The root cause is CWE-340 (Generation of Predictable Numbers or Identifiers) in the token generation helper of the RAGFlow API backend. Prior to 0.22.0, api/utils/api_utils.py implemented generate_confirmation_token(tenant_id) as a wrapper around itsdangerous URLSafeTimedSerializer(tenant_id), using the tenant identifier as both the serializer secret key and the salt before slicing serializer.dumps(get_uuid(), salt=tenant_id)[2:34]. Because the secret is not a random server-side value but a predictable per-tenant identifier, the function output is deterministic and reproducible by any party that knows the tenant_id. The beta share token in api/apps/system_app.py was produced by nesting the same function on itself - generate_confirmation_token(generate_confirmation_token(tenant_id)) - so the beta token embedded in a shared assistant/agent URL and the personal API key are both derived from the same low-entropy seed and are mutually derivable. The fix in commit a3bb4aadcc3494fb27f2a9933b4c46df8eb532e6 removes the tenant_id parameter entirely and replaces the whole scheme with cryptographically random secrets.token_urlsafe(32), dropping the URLSafeTimedSerializer import; the commit also touches api/apps/api_app.py (new_token) and rag/utils/redis_conn.py. The impact spans confidentiality, integrity and availability of the owner's account because the derived credential carries the owner's full API privileges.
Know when Ragflow gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:P
Network-reachable, no auth, low complexity once the share URL (intended to be distributed) is held; deriving the API key yields full account control, so C/I/A all High and scope unchanged.
Primary rating from Vendor (github).
CVSS VectorVendor: github
DescriptionCVE.org
RAGFlow is an open-source RAG (Retrieval-Augmented Generation) engine. In versions prior to 0.22.0, the use of an insecure key generation algorithm in the API key and beta (assistant/agent share auth) token generation process allows these tokens to be mutually derivable. Specifically, both tokens are generated using the same URLSafeTimedSerializer with predictable inputs, enabling an unauthorized user who obtains the shared assistant/agent URL to derive the personal API key. This grants them full control over the assistant/agent owner's account. Version 0.22.0 fixes the issue.
Executive ViewAI
RAGFlow deployments running versions earlier than 0.22.0 allow anyone holding an ordinary shared assistant or agent link to derive the owning user's personal API key, giving unauthenticated attackers full control of that account and any knowledge bases, documents, and connected systems it can reach. Because sharing links are commonly circulated to partners, customers, and internal teams, exposure is not limited to external attackers - a single leaked or forwarded link is sufficient. Leadership should treat this as an urgent credential-compromise risk affecting the confidentiality and integrity of data processed by the platform.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.
Affected Products (CPE)CVE.org
A vulnerability in infiniflow/ragflow versions v0.12.0 allows for remote code execution. Rated critical severity (CVSS 9
Path traversal vulnerability in RAGFlow RAG engine version 0.23.1 allows unauthenticated attackers to read arbitrary fil
In infiniflow/ragflow versions 0.12.0, the `web_crawl` function in `document_app.py` contains multiple vulnerabilities.
RAGFlow is an open-source RAG (Retrieval-Augmented Generation) engine. Rated high severity (CVSS 8.9), this vulnerabilit
The `add_llm` function in `llm_app.py` in infiniflow/ragflow version 0.11.0 contains a remote code execution (RCE) vulne
Remote code execution in RAGFlow versions prior to 0.23.0 allows a low-privileged authenticated user (a normal login acc
RAGFlow is an open-source RAG (Retrieval-Augmented Generation) engine based on deep document understanding. Rated high s
A Server-Side Request Forgery (SSRF) vulnerability exists in infiniflow/ragflow version 0.12.0. Rated high severity (CVS
RAGFlow 0.13.0 suffers from improper access control in document-hooks.ts, allowing unauthorized access to user documents
A vulnerability in infiniflow/ragflow version RAGFlow-0.13.0 allows for partial account takeover via insecure data query
Server-side template injection in RAGFlow 0.24.0 and earlier allows any authenticated user to execute arbitrary operatin
Unauthenticated network attackers can reach the get_dataset entry point in RAGFlow 0.24.0's evaluation_app API and, depe
NVD
CVE.org
EPSS
GitHub
VulDB
Exploit-DB