Skip to main content

RAGFlow EUVDEUVD-2026-33284

| CVE-2026-45312 CRITICAL
Improper Neutralization of Special Elements Used in a Template Engine (CWE-1336)
2026-05-29 GitHub_M
9.9
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

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

  1. Access
    Discover exposed RAGFlow UI
  2. Delivery
    Self-register low-privileged account
  3. Exploit
    Create Canvas with DuckDuckGo + LLM chain
  4. Execution
    Inject Jinja2 sandbox-escape payload
  5. Persist
    Trigger prompt generator render
  6. Impact
    Execute 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.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
No patch listed yet 0.0% exploitation probability (EPSS)

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

Alert me

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

ragflow ≤ 0.24.0

Affected Packages

euvd ragflow no fix

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

Vendor (GitHub_M) PRIMARY 9.9 CRITICAL
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

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Changed
Confidentiality
High
Integrity
High
Availability
High

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

Why It Matters

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.

Business Impact: Severe
Compensating Controls

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

EPSS Score
0.0%
Top 85% exploitable
Data Quality
6 sources
Confidence: High

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 CRITICAL
CISA KEV No
Public POC No
EPSS 0.0%
Patch available No
Active threat No
Deciding rule
CRITICAL severity
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
Out-of-Cycle
Exploitation
Poc
System Exposure· derived
Open
Automatable
No
Human Impact
Very High
Technical Impact
Total

Priority Score

50
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +50
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Code Injection CRITICAL

Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.

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