CVE-2026-45312: RAGFlow: Server-Side Template Injection in Prompt Generator leads to Remote Code Execution
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.
Security readout for executives and security teams
Plain-English summary
RAGFlow versions 0.24.0 and earlier have a critical flaw that can let a logged-in user run operating-system commands on the server. If registration or normal user access is broadly available, the business risk is severe: server takeover, data theft, service disruption, and pivoting are plausible outcomes.
Executive priority
Emergency priority for any exposed or multi-user RAGFlow deployment. The risk is not theoretical from a design standpoint: the reported impact is remote code execution by authenticated normal users. Contain access now, verify versions, and follow vendor remediation guidance before continued broad use.
Technical view
The issue is a Jinja2 server-side template injection in RAGFlow's prompt generator, identified in rag/prompts/generator.py. The source says any authenticated user can reach the vulnerable behavior through a Canvas workflow path involving DuckDuckGo and LLM components. CVSS 9.9 reflects low attack complexity, low privileges, no user interaction, changed scope, and full CIA impact.
Likely exposure
Organizations running infiniflow RAGFlow 0.24.0 or earlier are potentially exposed, especially if the service is internet-accessible, allows self-registration, or permits untrusted authenticated users. Evidence in the bundle identifies only RAGFlow as affected; no other products are supported by the provided sources.
Exploitation context
The CVE source describes a low-privilege authenticated path to arbitrary OS command execution. The bundle marks KEV as false, and no cited source states active exploitation. Treat exposure as urgent because normal user access may be enough, but do not assume exploitation has occurred without environment evidence.
Researcher notes
The provided evidence supports CWE-1336, affected versions through 0.24.0, and authenticated RCE via Jinja2 SSTI in the prompt generator. The bundle does not provide a fixed version, detailed patch, or active exploitation confirmation. Validate through inventory and configuration review rather than reproducing the exploit path.
Mitigation direction
Review the GitHub advisory for the vendor-named fixed release or mitigation.
Restrict RAGFlow access to trusted users and trusted networks immediately.
Disable open self-registration where it is enabled.
Limit or suspend untrusted Canvas workflow creation until remediation is confirmed.
Prioritize upgrading affected RAGFlow instances when vendor guidance identifies a safe version.
Validation and detection
Inventory all RAGFlow deployments and record their exact versions.
Flag any RAGFlow instance running 0.24.0 or earlier.
Confirm whether self-registration or broad authenticated access is enabled.
Identify internet-exposed or partner-accessible RAGFlow services.
Review logs for unusual workflow creation or low-privilege server-side activity.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · low confidence lookup
CWE-1336: Exact CWE lookup
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
The CVE wording references code or command execution, so execution technique review may help defensive triage. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
1CVSS vectors
3Timeline events
1ADP providers
2Source links
SSVC decision data
CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: pocAutomatable: noTechnical Impact: total
CVSS vector scores
1 official score
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-1336 · source CWE mapping
Improper Neutralization of Special Elements Used in a Template Engine
Improper Neutralization of Special Elements Used in a Template Engine represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.