| Title | InfiniFlow RAGFlow 1.0.0 Path Traversal |
|---|
| Description | Authenticated Canvas StringTransform gonja Template Injection Enables Arbitrary Host File Read in RAGFlow
RAGFlow (infiniflow/ragflow) at commit 3c6d2255af06164f0818d0959af10de0afd8b8fa compiles attacker-controlled Canvas StringTransform script content with gonja.FromString using gonja's default environment. That environment ships an unrestricted filesystem loader and disk-reading filters (file / fileset) plus include. A normal self-registered user who can create and debug their own canvas can cause the service process to read host-readable files and return the contents as component output (e.g. conf/service_conf.yaml and conf/private.pem).
Component: Canvas StringTransform (merge) → internal/agent/runtime/template_jinja.go (gonja.FromString); github.com/nikolalohinski/gonja v1.5.3
Vendor site: https://github.com/infiniflow/ragflow
Attack prerequisites: registration enabled (product default); attacker is a normal registered user with own canvas create/debug; no admin required; no user interaction.
Impact: process-privilege arbitrary file read returned via API (confidentiality Critical when signing keys or DB/object-store secrets under conf/ are exposed). Privilege delta: normal canvas owner → process-privilege arbitrary host file read. Host command execution is out of scope for this confirmed finding.
Note: post-rewrite residual of prior Python StringTransform SSTI (GHSA-vvwj-fvwh-4whx / CVE-2026-28797): same attacker model and field, different engine (Go gonja) and primitive (file read, not old Python RCE).
Recommended fix: do not use gonja.FromString / default env for canvas strings; custom env with empty/deny-all loader, disable include/import/extends, remove file/fileset filters; regression tests must fail closed.
Suggested CVSS 3.1: AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N (6.5)
Full write-up with Burp evidence:
https://gist.github.com/DReazer/79f87e0f829cadfafa21bbca34745495
|
|---|
| Source | ⚠️ https://gist.github.com/DReazer/79f87e0f829cadfafa21bbca34745495 |
|---|
| User | Snkn0w (UID 90071) |
|---|
| Submission | 11/09/2026 09:36 (24 days ago) |
|---|
| Moderation | 12/03/2026 10:03 (24 days later) |
|---|
| Status | Accepted |
|---|
| VulDB entry | 448617 [InfiniFlow RAGFlow up to 1.0.0 Canvas StringTransform template_jinja.go ResolveTemplateJinja script special elements in template engine] |
|---|
| Points | 20 |
|---|