RAGFlow
CVE-2025-68700
HIGH
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate with low-privilege RAGFlow account
-
DeliveryBuild Canvas workflow using CodeExec component
-
ExploitReturn crafted stdout parsed by eval()
-
ExecutionEscape sandbox into host process
-
PersistExecute arbitrary OS commands
-
ImpactChain unprotected endpoints for broader compromise
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization OS command sanitization, avoid shell exec
MITRE ATT&CK
2 techniques across 1 tactic: Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Requires an authenticated low-privilege ('normal login') RAGFlow account and use of the frontend Canvas CodeExec component, whose backend parses sandbox stdout with eval() (agent/tools/code_exec.py). Exploitation is limited to RAGFlow versions prior to 0.23.0; 0.23.0 patches it by replacing eval() with json.loads/ast.literal_eval. No user interaction beyond the attacker's own session is needed (UI:N), and the flaw bypasses the intended sandbox isolation. Additional endpoints with missing access control or inverted permission logic widen the attack surface and enable chaining, but the core RCE only needs a valid account plus reachability of the Canvas/CodeExec feature. |
| Impact | This is a genuine high-priority issue. The vendor-supplied CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:L/UI:N with full VC:H/VI:H/VA:H and subsequent-system SC:H/SI:H/SA:H, base 8.6) describes network-reachable, low-complexity, low-privilege command execution that escapes the sandbox into the host process - a scope-crossing full-triad compromise. The E:P (Proof-of-Concept) exploit-maturity metric aligns with the multi-source 'POC publicly available' signal, and the exploit reference is the vendor's own GitHub Security Advisory (GHSA-8xw3-v6c2-j84j), so the code path is well-documented and reproducible. The confirming CWE-78 (OS command injection) label is slightly imprecise: the root cause per the description and patch diff is untrusted stdout passed to Python eval(), i.e. code injection (closer to CWE-94), though the practical outcome - arbitrary system commands on the host - matches the command-injection framing. No EPSS score and no CISA KEV listing are provided, so there is no evidence of active mass exploitation; combined with the low real-world deployment footprint, this reads as a serious but not yet widely-weaponized flaw. Net: patch urgently where RAGFlow is deployed, but the absence of KEV/EPSS means risk is exposure-driven rather than campaign-driven. |
| Exploit ScenarioDerived | An attacker who holds any normal RAGFlow login account builds or triggers a Canvas workflow using the CodeExec component; because the component parses the sandbox's stdout with eval(), the attacker crafts output that eval() executes as Python in the host process, escaping sandbox isolation to run arbitrary OS commands on the server. Publicly available exploit details exist in the vendor GitHub Security Advisory, and additional endpoints with missing or inverted access-control logic let the attacker chain further actions. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 23, 2026
Remote code execution in RAGFlow versions prior to 0.23.0 allows a low-privileged authenticated user (a normal login account) to run arbitrary system commands on the server host by abusing the frontend Canvas CodeExec component. The backend reads stdout returned by the code sandbox and passes it to Python's eval(), so attacker-controlled output is executed outside the intended sandbox isolation; no additional user interaction is required beyond the attacker's own session, and additional endpoints with missing access control or inverted permission logic widen the attack surface for chained exploitation. Publicly available exploit code exists and a vendor patch is available in 0.23.0, which replaces eval() with json.loads/ast.literal_eval; this is a genuine high-priority issue per our independent assessment (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H).
RemediationAI
Upgrade RAGFlow to version 0.23.0 or later, which is the vendor-released patch for this issue and replaces the unsafe eval() call on sandbox stdout with json.loads/ast.literal_eval in agent/tools/code_exec.py; the exact fix is commit 7a344a32f9f83529e12ca12f40f2657eb79fe811 and the advisory is GHSA-8xw3-v6c2-j84j. If immediate upgrade is not possible, apply the following compensating controls with their trade-offs: disable or remove the Canvas CodeExec component and any other agent tools that forward user-supplied code to the sandbox (this eliminates the primary RCE vector but disables legitimate workflow-automation features), and audit the additional endpoints noted in the advisory for missing access control or inverted permission logic before relying on them. Restrict network access to the RAGFlow web UI and API so that only trusted users can obtain an authenticated session (PR:L means any valid low-privilege account is sufficient to exploit), and isolate the SANDBOX_HOST service (port 9385) on a segmented network or with egress/ingress restrictions so that a compromised stdout channel cannot reach host resources - note that sandbox-network separation reduces blast radius but does not fix the eval() execution occurring in the RAGFlow host process itself. Enforce least privilege on the RAGFlow service account so that arbitrary command execution cannot escalate to host root, and monitor CodeExec invocations for anomalous sandbox stdout content. Because publicly available exploit code exists (though no confirmed in-the-wild exploitation at time of analysis), prioritize patching externally exposed instances first.
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 flaw is a CWE-78 OS command injection rooted in unsafe deserialization inside RAGFlow's agent tooling, specifically agent/tools/code_exec.py in the Canvas CodeExec component. CodeExec submits user-authored scripts to a code sandbox service (http://{SANDBOX_HOST}:9385/run) and then treats the sandbox response's stdout field as trusted data, calling eval() on it in the belief that this would 'automatically convert string results into Python objects.' Because eval() executes any Python expression embedded in that string, a user who can influence the sandbox output can execute arbitrary commands within the RAGFlow host process, defeating the sandbox boundary entirely. The upstream fix commit replaces the eval() call with a _deserialize_stdout helper that tries json.loads and ast.literal_eval - both non-executing parsers - and refactors output population accordingly (agent/canvas.py is also touched for safer attribute/index traversal). The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:L/UI:N with full High C/I/A and subsequent-system impacts) confirms network reachability, low attack complexity, and a required low-privileged account, matching our CVSS 3.1 assessment. The affected component is identified by CPE cpe:2.3:a:infiniflow:ragflow:*:*:*:*:*:*:*:* for all releases prior to 0.23.0.
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:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/E:P
Network-reachable with any normal account (PR:L, AC:L) and no interaction; eval() breaks sandbox isolation to run code in the host process, so S:C with full C/I/A:H.
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.23.0, a low-privileged authenticated user (normal login account) can execute arbitrary system commands on the server host process via the frontend Canvas CodeExec component, completely bypassing sandbox isolation. This occurs because untrusted data (stdout) is parsed using eval() with no filtering or sandboxing. The intended design was to "automatically convert string results into Python objects," but this effectively executes attacker-controlled code. Additional endpoints lack access control or contain inverted permission logic, significantly expanding the attack surface and enabling chained exploitation. Version 0.23.0 contains a patch for the issue.
Executive ViewAI
RAGFlow versions prior to 0.23.0 contain a high-severity remote code execution vulnerability that allows any authenticated low-privileged user to execute arbitrary commands on the server. Publicly available exploit code exists, and successful exploitation could lead to full system compromise, data breach, and service disruption. Leadership should prioritize immediate patching to prevent exploitation.
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
OS command injection occurs when an application passes unsanitized user input directly into system shell commands.
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
RAGFlow versions prior to 0.22.0 generate API keys and beta assistant/agent share tokens with a predictable scheme, lett
The `add_llm` function in `llm_app.py` in infiniflow/ragflow version 0.11.0 contains a remote code execution (RCE) vulne
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