RAGFlow
CVE-2025-69286
HIGH
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/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
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
Lifecycle Timeline
3DescriptionCVE.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.
AnalysisAI
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.
Technical ContextAI
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.
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.
Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t
BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser
pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi
The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python
BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica
OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph
pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.
Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301
In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse
Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to
Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/
pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne
Same technique Authentication Bypass
View allShare
External POC / Exploit Code
Leaving vuln.today