Skip to main content

RAGFlow CVE-2025-68700

HIGH
OS Command Injection (CWE-78)
2025-12-31 security-advisories@github.com
8.6
CVSS 4.0 · Vendor: github
View

Attack ChainAIDerived

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

  1. Access
    Authenticate with low-privilege RAGFlow account
  2. Delivery
    Build Canvas workflow using CodeExec component
  3. Exploit
    Return crafted stdout parsed by eval()
  4. Execution
    Escape sandbox into host process
  5. Persist
    Execute arbitrary OS commands
  6. Impact
    Chain 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.

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

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

Alert me

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

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

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.

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

Primary rating from Vendor (github).

CVSS VectorVendor: github

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

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

Why It Matters

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.

Business Impact: Severe
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.7%
Top 48% exploitable
Prevalence
Low
popular open-source RAG engine but niche, emerging AI-infra production footprint
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.7%
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
No
Human Impact
Very High

Priority Score

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

Attack Technique

OS command injection occurs when an application passes unsanitized user input directly into system shell commands.

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-2025-69286 HIGH POC
8.9 Dec 31

RAGFlow versions prior to 0.22.0 generate API keys and beta assistant/agent share tokens with a predictable scheme, lett

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