Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessDiscover exposed RAGFlow UI
-
DeliverySelf-register low-privileged account
-
ExploitCreate Canvas with DuckDuckGo + LLM chain
-
ExecutionInject Jinja2 sandbox-escape payload
-
PersistTrigger prompt generator render
-
ImpactExecute OS commands as service user
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V1 - Encoding and Sanitization Template injection prevention
|
| Exploitation Conditions | The attacker needs (1) network reachability to the RAGFlow web interface, (2) a low-privileged authenticated account - trivially obtained where the default self-registration flow is enabled, which the advisory explicitly calls out, and (3) the ability to create or edit a Canvas workflow that chains a DuckDuckGo component with an LLM component so that attacker-controlled text reaches the Jinja2 prompt renderer in rag/prompts/generator.py. Exploitation is limited where administrators have disabled open registration, restricted Canvas authoring to trusted roles, or fronted the UI with external authentication; affected scope is RAGFlow 0.24.0 and earlier only, and no user interaction by another party is required. |
| Impact | Signals converge on high real-world risk. The CVSS 9.9 vector (AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H) reflects network reach, low complexity, only low-privileged authentication, no user interaction, and a scope change that yields full CIA impact - consistent with RCE on the host. The PR:L requirement is meaningfully eroded by RAGFlow's typical self-registration model, which the advisory explicitly highlights ('any normal user can register'). EPSS and CISA KEV data are not provided in the input, and no public exploit is identified at time of analysis; however, SSTI in a documented code path with a clear trigger recipe (DuckDuckGo + LLM Canvas chain) is straightforward to weaponize, so absence of public PoC should not lower prioritization. The main caveat: the exact patched version is not stated in the available data and must be confirmed against the GHSA advisory before relying on a fix. |
| Exploit ScenarioDerived | An attacker browses to an internet-exposed RAGFlow instance, self-registers a normal account, and creates a Canvas workflow chaining a DuckDuckGo retrieval component into an LLM component. By embedding a Jinja2 sandbox-escape payload in the prompt or component configuration that reaches rag/prompts/generator.py, the attacker forces template rendering to evaluate Python expressions that invoke os.system, gaining arbitrary command execution as the RAGFlow service account on the underlying host. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – May 29, 2026
Server-side template injection in RAGFlow 0.24.0 and earlier allows any authenticated user to execute arbitrary operating system commands on the host through the Jinja2-based prompt generator (rag/prompts/generator.py). Because RAGFlow installations commonly permit open self-registration, the practical barrier is minimal: an attacker registers an account, builds a Canvas workflow chaining a DuckDuckGo retrieval node with an LLM node, and triggers the SSTI to break out of the Jinja2 sandbox. No public exploit identified at time of analysis, but the vendor security advisory describes the chain explicitly.
RemediationAI
Patch available per vendor advisory GHSA-wpg4-h5g2-jxm6 (https://github.com/infiniflow/ragflow/security/advisories/GHSA-wpg4-h5g2-jxm6); upgrade to the fixed release identified there as soon as it is confirmed (the input data does not enumerate the exact fix version, so verify against the advisory before deploying). Until upgrade is possible, disable open user self-registration to remove the trivial-PR:L path, restrict Canvas workflow creation to trusted administrators, and place the RAGFlow web interface behind an authenticating reverse proxy or VPN to remove unauthenticated reachability - note that disabling registration breaks multi-tenant onboarding and restricting Canvas authoring breaks legitimate prompt engineering work. As a containment measure, run the RAGFlow service under a non-root, sandboxed user with seccomp/AppArmor and outbound egress filtering so that a successful SSTI yields the least-privileged shell possible.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
RAGFlow (cpe:2.3:a:infiniflow:ragflow) is an open-source Retrieval-Augmented Generation engine that lets users compose 'Canvas' pipelines combining retrieval tools (e.g., DuckDuckGo) with LLM components. Prompts assembled for these components flow through a Jinja2 template renderer in rag/prompts/generator.py. The flaw maps to CWE-1336 (Improper Neutralization of Special Elements Used in a Template Engine), the classic SSTI class where untrusted input reaches a templating engine that exposes Python object internals - allowing template expressions such as attribute traversal through __class__, __mro__, and __subclasses__ to reach os.system, subprocess.Popen, or similar primitives and achieve OS command execution under the RAGFlow service account.
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
AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
Primary rating from Vendor (GitHub_M) · only source for this CVE.
CVSS VectorVendor: GitHub_M
DescriptionCVE.org
RAGFlow is an open-source RAG (Retrieval-Augmented Generation) engine. In 0.24.0 and earlier, a Jinja2 template injection in the prompt generator (rag/prompts/generator.py) allows any authenticated user to execute arbitrary OS commands on the server. Any normal user can register, create a Canvas workflow with a DuckDuckGo + LLM component chain, and trigger the SSTI.
Executive ViewAI
RAGFlow versions 0.24.0 and earlier contain a critical server-side template injection vulnerability allowing authenticated users to execute arbitrary operating system commands on the hosting infrastructure; no public exploit identified at time of analysis, but the vendor has documented the exploitation chain explicitly. Since most RAGFlow deployments support open self-registration, the practical authentication barrier is minimal-any attacker can register an account and immediately gain command execution capability. This creates unmitigated risk of complete infrastructure compromise.
No vendor-released patch identified at time of analysis. Interim mitigations: (1) Disable self-registration and implement manual account provisioning with approval workflows; (2) Deploy network segmentation and firewall rules restricting RAGFlow host outbound connectivity; (3) Run RAGFlow with minimal system privileges in containerized/sandboxed environments; (4) Implement continuous monitoring of system command execution with real-time alerting; (5) Apply Web Application Firewall rules to detect and block Jinja2 template injection patterns; (6) Maintain offline backup copies of critical data.
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
Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.
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
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
Unauthenticated network attackers can reach the get_dataset entry point in RAGFlow 0.24.0's evaluation_app API and, depe
EUVD-2026-33284
NVD
CVE.org
EPSS
Vulnrichment
GitHub
Exploit-DB