Skip to main content

RAGFlow CVE-2025-69286

HIGH
Generation of Predictable Numbers or Identifiers (CWE-340)
2025-12-31 security-advisories@github.com
8.9
CVSS 4.0 · Vendor: github
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Obtain shared assistant/agent URL
  2. Delivery
    Extract embedded beta share token
  3. Exploit
    Derive owner API key from predictable serializer
  4. Execution
    Authenticate as account owner
  5. Impact
    Full 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 URLSafeTimedSerializer seeded with the tenant_id as both key and salt, allowing derivation of the owner's personal API key. No authentication or user interaction is needed (PR:N/UI:N), and the vector is network-reachable. The practical limiting factor is possession of a valid shared assistant/agent URL; instances that never expose shared assistants are not exposed to this specific derivation path. Fixed in 0.22.0, which switches to cryptographically random secrets.token_urlsafe(32).

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 generate_confirmation_token(tenant_id) seeds URLSafeTimedSerializer with the tenant_id as both secret key and salt, making the API key and the beta (share) token mutually derivable - the fix replaces this with secrets.token_urlsafe(32). A POC is publicly available and the GitHub advisory (GHSA-9j5g-g4xm-57w7) plus patch commit confirm the root cause, so exploitation is well-documented. The CVSS 4.0 exploit maturity metric is E:P (proof-of-concept), consistent with 'publicly available exploit code exists' but NOT active-exploitation; this is not on CISA KEV and no EPSS score was provided, so treat it as demonstrably exploitable rather than confirmed in-the-wild. The one realistic constraint the raw score does not capture is that the attacker must first obtain a shared assistant/agent URL (which embeds the beta token), so the population at risk is deployments that actually share assistants/agents.

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 URLSafeTimedSerializer, the attacker reverses/derives the owner's personal API key from that shared token, gaining full control of the owner's account. A public proof-of-concept exists per the GitHub Security Advisory.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.8% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

Vendor (github) PRIMARY 8.9 HIGH
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
vuln.today AI 9.8 CRITICAL

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.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (github).

CVSS VectorVendor: github

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

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

Why It Matters

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.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.8%
Top 46% exploitable
Prevalence
Medium
popular open-source RAG engine, growing adoption but not ubiquitous infrastructure
Exploit
POC
Public exploit code exists
Data Quality
3 sources
Confidence: Low

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.

SignalValue
Severity HIGH
CISA KEV No
Public POC Yes
EPSS 0.8%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Out-of-Cycle
Exploitation· derived
Poc
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
High

Priority Score

65
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +44
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.

Affected Products (CPE)CVE.org

cpe:2.3:a:infiniflow:ragflow:*:*:*:*:*:*:*:*
CVE-2024-12433 CRITICAL POC
9.8 Mar 20

A vulnerability in infiniflow/ragflow versions v0.12.0 allows for remote code execution. Rated critical severity (CVSS 9

CVE-2026-24770 CRITICAL POC
9.8 Jan 27

Path traversal vulnerability in RAGFlow RAG engine version 0.23.1 allows unauthenticated attackers to read arbitrary fil

CVE-2024-12450 CRITICAL POC
9.8 Mar 20

In infiniflow/ragflow versions 0.12.0, the `web_crawl` function in `document_app.py` contains multiple vulnerabilities.

CVE-2025-27135 HIGH POC
8.9 Feb 25

RAGFlow is an open-source RAG (Retrieval-Augmented Generation) engine. Rated high severity (CVSS 8.9), this vulnerabilit

CVE-2024-10131 HIGH POC
8.8 Oct 19

The `add_llm` function in `llm_app.py` in infiniflow/ragflow version 0.11.0 contains a remote code execution (RCE) vulne

CVE-2025-68700 HIGH POC
8.6 Dec 31

Remote code execution in RAGFlow versions prior to 0.23.0 allows a low-privileged authenticated user (a normal login acc

CVE-2025-25282 HIGH POC
8.1 Feb 21

RAGFlow is an open-source RAG (Retrieval-Augmented Generation) engine based on deep document understanding. Rated high s

CVE-2024-12779 HIGH POC
7.5 Mar 20

A Server-Side Request Forgery (SSRF) vulnerability exists in infiniflow/ragflow version 0.12.0. Rated high severity (CVS

CVE-2024-53450 HIGH POC
7.5 Dec 09

RAGFlow 0.13.0 suffers from improper access control in document-hooks.ts, allowing unauthorized access to user documents

CVE-2024-12880 MEDIUM POC
6.5 Mar 20

A vulnerability in infiniflow/ragflow version RAGFlow-0.13.0 allows for partial account takeover via insecure data query

CVE-2026-45312 CRITICAL
9.9 May 29

Server-side template injection in RAGFlow 0.24.0 and earlier allows any authenticated user to execute arbitrary operatin

CVE-2026-51897 CRITICAL
9.8 Oct 01

Unauthenticated network attackers can reach the get_dataset entry point in RAGFlow 0.24.0's evaluation_app API and, depe

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy