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.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2026-45312
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 4 Nov 2026, 15:49 UTC · Revision 1
Source evidence
RAGFlow: Server-Side Template Injection in Prompt Generator leads to Remote Code Execution
core-osv · Original sourcePublished 29 May 2026, 12:24 UTC
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.
osv:CVE-2026-45312
Complete source record
{
"id": "b52ad56b5df494d00e6b69ee38902d8bc16447175399feba449ada1cad72d612",
"url": "https://osv.dev/vulnerability/CVE-2026-45312",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "RAGFlow: Server-Side Template Injection in Prompt Generator leads to Remote Code Execution",
"summary": "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.",
"evidence": "osv:CVE-2026-45312",
"products": [],
"severity": "critical",
"structured": {
"id": "CVE-2026-45312",
"aliases": [
"CVE-2026-45312",
"GHSA-wpg4-h5g2-jxm6"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/infiniflow/ragflow",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"last_affected": "392ec99651da78f6a8e1a2f60fe4818a95a8651d"
}
],
"database_specific": {
"extracted_events": [
{
"range": [
{
"introduced": "0"
},
{
"last_affected": "0.24.0"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StringRangeExpression"
},
{
"range": [
{
"introduced": "0"
},
{
"last_affected": "0.24.0"
}
],
"source": "DESCRIPTION"
}
]
}
}
],
"versions": [
"v0.24.0",
"nightly",
"v0.23.1",
"v0.23.0",
"v0.22.1",
"v0.22.0",
"v0.21.1",
"v0.21.0",
"v0.20.5",
"v0.20.4",
"v0.20.3",
"v0.20.2",
"v0.20.1",
"v0.20.0",
"v0.19.1",
"v0.19.x",
"v0.18.0",
"v0.17.2",
"v0.17.1",
"v0.17.0",
"v0.16.0",
"v0.15.1",
"v0.15.0",
"v0.14.1",
"v0.14.0",
"v0.13.0",
"v0.12.0",
"v0.11.0",
"v0.10.0",
"v0.9.0",
"v0.8.0",
"v0.7.0",
"v0.6.0",
"v0.5.0",
"v0.4.0",
"v0.3.2",
"v0.3.1",
"v0.3.0",
"v0.2.0",
"v0.1.0"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-45312.json"
}
}
],
"modified": "2026-10-28T02:30:36.789688075Z",
"provider": "osv",
"references": [
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/45xxx/CVE-2026-45312.json",
"https://github.com/infiniflow/ragflow/security/advisories/GHSA-wpg4-h5g2-jxm6",
"https://nvd.nist.gov/vuln/detail/CVE-2026-45312"
],
"provider_metadata": {
"cwe_ids": [
"CWE-1336"
],
"cna_assigner": "GitHub_M",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/45xxx/CVE-2026-45312.json"
}
},
"related_cves": [
{
"value": "CVE-2026-45312",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 504270,
"published_at": "2026-05-29T12:24:07.996+00:00"
}