CVE-2026-45312
Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.
NVD · uneditedRAGFlow 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.
Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.
dbcve analysis · high confidenceA Server-Side Template Injection (SSTI) vulnerability in RAGFlow 0.24.0 and earlier allows authenticated users to achieve arbitrary OS command execution via Jinja2 template manipulation in the prompt generator (rag/prompts/generator.py). Attackers can register a normal user account, create a Canvas workflow containing a DuckDuckGo + LLM component chain, and inject malicious template syntax to execute commands on the underlying server.
Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.
CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.
From the vector- Attack vector
- Network
- Complexity
- Low
- Privileges
- Low
- User interaction
- None
- Scope
- Changed
- Confidentiality
- High
- Integrity
- High
- Availability
- High
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.
dbcve checksWork through these to decide whether this CVE applies to you.
-
Determine installed RAGFlow versionCheck the version file or the application UI for the current RAGFlow version. Common locations include: version info in the UI footer, a VERSION file in the installation directory, or the Docker image tag if running in containers.Affected if The installed version is 0.24.0 or any version earlier than 0.24.0
-
Verify the prompt generator file existsInspect the file rag/prompts/generator.py in the RAGFlow installation directory. This file handles Jinja2 template processing for the prompt generator.Affected if The file exists and is present in version 0.24.0 or earlier, indicating the vulnerable code path is in place
-
Check if user registration is enabledReview the RAGFlow configuration settings or database for user registration status. Look for settings that allow new user self-registration or invitation-based account creation.Affected if User registration or new user invitation is enabled, allowing external attackers to obtain authenticated access
-
Identify active Canvas workflows with DuckDuckGo and LLM componentsReview the RAGFlow Canvas workflows to identify any active or saved workflows that contain both DuckDuckGo search integration and LLM components, as this combination triggers the vulnerable template processing path.Affected if Any Canvas workflow with DuckDuckGo + LLM components exists and is executable by authenticated users
-
Inspect Jinja2 template usage in prompt generatorExamine the rag/prompts/generator.py file for direct use of Jinja2 template rendering with user-provided or workflow-derived input without sanitization functions, safe subprocess execution, or sandboxing.Affected if The code shows unsanitized Jinja2 template rendering (e.g., Template(...).render() or environment.from_string() called with workflow variable inputs)
A user is affected if RAGFlow version is 0.24.0 or earlier, authenticated user registration is enabled, and Canvas workflows with DuckDuckGo and LLM components are in use, exposing unsanitized Jinja2 template processing.
Generated from the published advisory. Verify against your own configuration.
Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.
dbcve · scopedUpgrade RAGFlow to a version newer than 0.24.0 which patches the template injection. If immediate patching is not feasible, disable new user registration and implement strict input validation or sandboxing on the prompt generator component to block Jinja2 template syntax in user-controlled inputs.
Latest RAGFlow release newer than 0.24.0 (check GitHub releases for security patches)
- 1. Identify the current RAGFlow version by checking the installation or docker image tag
- 2. Check the official RAGFlow GitHub repository (github.com/infiniflow/ragflow) for releases newer than 0.24.0 that address this SSTI vulnerability
- 3. Upgrade to the latest stable release that contains the security fix for the Jinja2 template injection in rag/prompts/generator.py
- 4. After upgrade, verify the fix by ensuring the prompt generator properly sanitizes Jinja2 template inputs
- 5. Review user permissions and consider limiting workflow creation capabilities for untrusted users until upgrade is complete
Generated from the published advisory — verify against the referenced sources before acting.
- Consultation3.0 h
- Implementation6.0 h
- Testing4.0 h
- Review / QA3.0 h
An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $4,512.
Scan for this in your stack
Free · runs locallyCheck whether your project pulls in CVE-2026-45312 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.
References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.
Primary sourcesPractitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2026-45312 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
No notes yet
Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.
A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.
- Verified mitigations, workarounds, and config changes
- Version or environment caveats, and links to real fixes
- No weaponised exploit code, or anything meant to cause harm
- No spam, self-promotion, credentials, or personal data