CVE-2026-45312: CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine in infiniflow ragflow
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.
AI Analysis
Technical Summary
RAGFlow versions 0.24.0 and earlier contain a server-side template injection (SSTI) vulnerability in the prompt generator (rag/prompts/generator.py) that leverages improper neutralization of special elements in Jinja2 templates. Authenticated users can exploit this by creating a Canvas workflow with a DuckDuckGo + LLM component chain, triggering arbitrary OS command execution on the server. This vulnerability is tracked as CWE-1336 and has a CVSS 3.1 base score of 9.9, reflecting network attack vector, low attack complexity, low privileges required, no user interaction, and complete impact on confidentiality, integrity, and availability. The vendor has not provided a patch or official remediation at this time.
Potential Impact
Successful exploitation allows any authenticated user to execute arbitrary operating system commands on the server hosting RAGFlow, potentially leading to full system compromise. This impacts confidentiality, integrity, and availability of the affected system. Since any normal user can register and exploit this, the attack surface is broad within environments where RAGFlow is deployed.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is released, restrict user registration and workflow creation privileges to trusted users only. Monitor for suspicious activity related to workflow creation and command execution. Avoid exposing the vulnerable versions of RAGFlow to untrusted networks.
CVE-2026-45312: CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine in infiniflow ragflow
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.
CVSS v3.1
Score 9.9critical
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
RAGFlow versions 0.24.0 and earlier contain a server-side template injection (SSTI) vulnerability in the prompt generator (rag/prompts/generator.py) that leverages improper neutralization of special elements in Jinja2 templates. Authenticated users can exploit this by creating a Canvas workflow with a DuckDuckGo + LLM component chain, triggering arbitrary OS command execution on the server. This vulnerability is tracked as CWE-1336 and has a CVSS 3.1 base score of 9.9, reflecting network attack vector, low attack complexity, low privileges required, no user interaction, and complete impact on confidentiality, integrity, and availability. The vendor has not provided a patch or official remediation at this time.
Potential Impact
Successful exploitation allows any authenticated user to execute arbitrary operating system commands on the server hosting RAGFlow, potentially leading to full system compromise. This impacts confidentiality, integrity, and availability of the affected system. Since any normal user can register and exploit this, the attack surface is broad within environments where RAGFlow is deployed.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is released, restrict user registration and workflow creation privileges to trusted users only. Monitor for suspicious activity related to workflow creation and command execution. Avoid exposing the vulnerable versions of RAGFlow to untrusted networks.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-05-11T20:50:30.538Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a198b23e29bf47b50e58de4
Added to database: 5/29/2026, 12:48:35 PM
Last enriched: 5/29/2026, 1:03:50 PM
Last updated: 5/31/2026, 4:53:41 AM
Views: 10
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.