# CVE-2026-45312: RAGFlow: Server-Side Template Injection in Prompt Generator leads to Remote Code Execution

- Severity: Critical 9.9 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.45%, higher than 40% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-05-29T12:24:07.996Z
- Modified: 2026-07-21T12:10:00.090Z
- Weaknesses: CWE-1336
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- infiniflow ragflow: <= 0.24.0

## References

- <https://github.com/infiniflow/ragflow/security/advisories/GHSA-wpg4-h5g2-jxm6> (exploit)

## Sources

- CVE List: [CVE-2026-45312](https://www.cve.org/CVERecord?id=CVE-2026-45312), CVE Terms of Use, modified 2026-06-02
- NVD: [CVE-2026-45312](https://nvd.nist.gov/vuln/detail/CVE-2026-45312), Public domain, modified 2026-07-21

---

Page: https://cve.day/CVE-2026-45312 · Whole record: https://cve.day/CVE-2026-45312.json · Rebuilt by cve.day 2026-11-25T22:59:23.305Z
