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) due to improper neutralization of special elements in Jinja2 templates. Authenticated users can exploit this by registering normally, creating a Canvas workflow that includes a DuckDuckGo and LLM component chain, and triggering the injection to execute arbitrary OS commands on the server. This vulnerability is tracked as CWE-1336 and has a CVSS v3.1 score of 9.9, reflecting its critical nature and ease of exploitation with significant impact.
Potential Impact
Successful exploitation allows authenticated users with normal privileges to execute arbitrary operating system commands on the server hosting RAGFlow. This can lead to full compromise of the server, including unauthorized data access, modification, or destruction, and potential disruption of service. The vulnerability affects confidentiality, integrity, and availability of the affected system.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. No official fix or patch is currently documented. Until a patch is available, restrict user registration and workflow creation privileges to trusted users only, and monitor for suspicious activity related to workflow creation and execution. Avoid exposing the vulnerable versions in production environments.
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
Affected software
pkg:github/infiniflow/ragflowRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
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) due to improper neutralization of special elements in Jinja2 templates. Authenticated users can exploit this by registering normally, creating a Canvas workflow that includes a DuckDuckGo and LLM component chain, and triggering the injection to execute arbitrary OS commands on the server. This vulnerability is tracked as CWE-1336 and has a CVSS v3.1 score of 9.9, reflecting its critical nature and ease of exploitation with significant impact.
Potential Impact
Successful exploitation allows authenticated users with normal privileges to execute arbitrary operating system commands on the server hosting RAGFlow. This can lead to full compromise of the server, including unauthorized data access, modification, or destruction, and potential disruption of service. The vulnerability affects confidentiality, integrity, and availability of the affected system.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. No official fix or patch is currently documented. Until a patch is available, restrict user registration and workflow creation privileges to trusted users only, and monitor for suspicious activity related to workflow creation and execution. Avoid exposing the vulnerable versions in production environments.
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: 05/29/2026, 12:48:35 UTC
Last enriched: 06/05/2026, 20:53:05 UTC
Last updated: 07/31/2026, 19:22:59 UTC
Views: 54
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.