CVE-2026-45312
RAGFlow: Server-Side Template Injection in Prompt Generator leads to Remote Code Execution
Description
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.
In plain language
AI Act nowCVE-2026-45312 is a serious bug in RAGFlow (versions 0.24.0 and earlier) that can let a normal logged-in user run commands on your server; if you use RAGFlow with any user accounts that can create or trigger prompt/Canvas workflows, you should treat this as an urgent fix—even though a public patch isn’t available.
In RAGFlow (ragflow) versions 0.24.0 and earlier, a Server-Side Template Injection in the prompt generator (Jinja2 prompt handling) can be triggered by an authenticated user via prompt/Canvas workflow creation and execution, leading to Remote Code Execution on the server; exploitation is reported with actor Qilin and is driving rising press attention.
What to do now
- Check which RAGFlow version you run (and confirm whether it is 0.24.0 or earlier).
- If you are on 0.24.0 or earlier, assume risk if you have any user accounts beyond a fully trusted admin (because a normal authenticated user can trigger the bug).
- Immediately restrict access to RAGFlow: limit who can log in, and disable or strongly restrict features that let users create/trigger Canvas workflows and prompt generator steps.
- If you can’t upgrade (no fixed version is provided), isolate the RAGFlow server from the rest of your network and limit inbound access to only the IPs/users who need it.
- Collect and review server logs for evidence of suspicious template/prompt activity and unexpected process execution around the time of any suspicious logins or workflow runs.
CVSS Vector Breakdown
AV:NAttack VectorAC:LAttack ComplexityPR:LPrivileges RequiredUI:NUser InteractionS:CScopeC:HConfidentialityI:HIntegrityA:HAvailabilityWeaknesses
Affected Products
Exploitability
References
Unlock Complete Vulnerability Intelligence
Get the full picture for CVE-2026-45312 and every CVE in our database. Create a free account — no credit card required.
Create Free Account