{"id":"CVE-2026-45312","state":"PUBLISHED","title":"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.","publishedAt":"2026-05-29T12:24:07.996Z","updatedAt":"2026-06-02T01:02:42.683Z","severity":{"score":9.9,"label":"Critical","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","source":"GitHub_M"},"assigner":"GitHub_M","products":["infiniflow ragflow"],"affected":[{"vendor":"infiniflow","product":"ragflow","versions":[{"version":"<= 0.24.0","status":"affected"}]}],"references":["https://github.com/infiniflow/ragflow/security/advisories/GHSA-wpg4-h5g2-jxm6"],"weaknesses":["CWE-1336"],"ingestedAt":"2026-10-29T20:12:07.131Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/45xxx/CVE-2026-45312.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-45312","state":"PUBLISHED","datePublished":"2026-05-29T12:24:07.996Z","dateUpdated":"2026-06-02T01:02:42.683Z","assignerShortName":"GitHub_M","assignerOrgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateReserved":"2026-05-11T20:50:30.538Z"},"containers":{"cna":{"title":"RAGFlow: Server-Side Template Injection in Prompt Generator leads to Remote Code Execution","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"infiniflow","product":"ragflow","versions":[{"version":"<= 0.24.0","status":"affected"}]}],"references":[{"url":"https://github.com/infiniflow/ragflow/security/advisories/GHSA-wpg4-h5g2-jxm6","name":"https://github.com/infiniflow/ragflow/security/advisories/GHSA-wpg4-h5g2-jxm6","tags":["x_refsource_CONFIRM"]}],"metrics":[{"cvssV3_1":{"attackComplexity":"LOW","attackVector":"NETWORK","availabilityImpact":"HIGH","baseScore":9.9,"baseSeverity":"CRITICAL","confidentialityImpact":"HIGH","integrityImpact":"HIGH","privilegesRequired":"LOW","scope":"CHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","version":"3.1"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-1336","lang":"en","description":"CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine","type":"CWE"}]}],"providerMetadata":{"shortName":"GitHub_M","orgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateUpdated":"2026-05-29T12:24:07.996Z"},"source":{"advisory":"GHSA-wpg4-h5g2-jxm6","discovery":"UNKNOWN"}},"adp":[{"title":"CISA ADP Vulnrichment","references":[{"url":"https://github.com/infiniflow/ragflow/security/advisories/GHSA-wpg4-h5g2-jxm6","tags":["exploit"]}],"metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-06-02T01:01:26.376594Z","id":"CVE-2026-45312","options":[{"Exploitation":"poc"},{"Automatable":"no"},{"Technical Impact":"total"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-06-02T01:02:42.683Z"}}]}}}