⚠️

Disclaimer & Liability

The content provided on this website is for educational, research, and security awareness purposes only. Any unauthorized, illegal, or abusive use of the information, tools, and techniques discussed is solely the responsibility of the user. The author and publisher assume no liability for any damages, injuries, or consequences resulting from the misuse of this content.

CVE-2026-143864: Server-Side Template Injection in InfiniFlow RAGFlow's Canvas StringTransform Handler | Alireza Bolbolabadi - Red Team Security
LOADING

CVE-2026-143864: Server-Side Template Injection in InfiniFlow RAGFlow's Canvas StringTransform Handler

Executive Summary

CVE-2026-143864 documents a Server-Side Template Injection (SSTI) class weakness in InfiniFlow RAGFlow. The defect is located in the ResolveTemplateJinja function inside internal/agent/runtime/template_jinja.go, reachable through the Canvas StringTransform Handler of the agent runtime. All versions up to and including 1.0.0 are reported as affected. The vulnerability is exploitable over the network, a public exploit has been circulated, and the vendor was contacted early in disclosure but did not respond.

Vulnerability Mechanics

ResolveTemplateJinja accepts a script argument that, when crafted by an attacker, causes Jinja-style template metacharacters to be evaluated rather than escaped. The categorization — improper neutralization of special elements used in a template engine — points to the absence of a sanitization layer between caller input and the template rendering pipeline.

The reachable surface is the Canvas StringTransform Handler, a component of the agent runtime. Because Jinja templates can traverse Python attributes at render time, the realistic ceiling of impact stretches from disclosure of server-side configuration and application state to command execution if rendering is unconstrained or a sandbox can be bypassed. The CVSS base score of 4.3 frames the issue narrowly, with limited confidentiality and integrity impact and no modeled availability impact.

Affected Systems

  • InfiniFlow RAGFlow, all versions at or below 1.0.0

  • Deployments where the Canvas StringTransform Handler is enabled and reachable from the request source

  • Self-hosted instances and any topology that exposes Canvas / StringTransform endpoints without strict authentication

Threat Picture

Several signals raise practical relevance despite the modest score. A public exploit is described as available for use, lowering the skill and effort required to reproduce the issue. A non-responsive vendor removes the typical coordinated disclosure cushion, leaving operators without an upstream patch path. The attack vector is remote.

Counterbalancing signals: the CVE is not currently listed on the CISA KEV catalog, and no in-the-wild exploitation has been documented in the available material. The realistic ceiling further depends on whatever sandbox or process isolation surrounds the RAGFlow service.

The net read: exploitability is plausible rather than demonstrated, and the impact ceiling is bounded by the runtime sandbox and privilege boundary that surround the service process.

Mitigation

Patch status is unconfirmed and the vendor has not responded, so mitigation rests on defense-in-depth rather than a single upstream fix.

Network and access control

  • Place the Canvas StringTransform Handler and the broader agent runtime behind authentication and an internal reverse proxy

  • Avoid direct internet exposure of RAGFlow endpoints

  • Segment self-hosted instances away from untrusted networks

Input handling

  • Validate or strip Jinja metacharacters — including {{, {%, {#, and Python attribute-walking patterns such as class, mro, subclasses — from any script or string-transform input before it reaches ResolveTemplateJinja

  • Reduce reliance on Canvas StringTransform nodes whose inputs come from untrusted sources

  • Where configuration allows, switch to a Jinja sandbox with strict undefined behavior (jinja2.sandbox.SandboxedEnvironment)

Runtime hardening

  • Run RAGFlow under a least-privilege service account

  • Use a container with a read-only filesystem, dropped Linux capabilities, and a constrained seccomp or AppArmor profile

  • Restrict outbound network egress from the RAGFlow process to known dependencies

Monitoring and detection

  • Search RAGFlow logs for ResolveTemplateJinja invocations whose arguments contain {{, class, mro, subclasses, config, or request

  • Add WAF or IDS rules that flag Jinja template syntax or Python attribute strings against the Canvas and StringTransform endpoints

  • Track unexpected outbound connections or child processes spawned from the RAGFlow service, which are typical post-exploitation indicators

Vendor follow-up

  • Watch the InfiniFlow RAGFlow repository and release notes for any post-1.0.0 release that touches internal/agent/runtime/template_jinja.go

  • Re-check the NVD entry for any subsequent vendor response, patch, or KEV listing

Expert Insight

Server-Side Template Injection continues to surface because template engines are designed to evaluate, not to parse, and treating them as input validators is the recurring mistake. Two operational facts sharpen the picture for CVE-2026-143864: a public exploit shifts the issue from theoretical to reproducible, and a non-responsive vendor removes the coordinated-disclosure cushion defenders normally rely on. The CVSS of 4.3 reflects a cautious, narrow reading — limited confidentiality, no availability impact — but Jinja SSTI inside a long-running agent runtime has historically been a stepping stone into deeper object-graph traversal. Operators should not dismiss the issue simply because the score is modest.

Recommendations

  • Monitor CVE-2026-143864 and re-check the NVD entry periodically for vendor updates and any KEV listing

  • Audit every Canvas StringTransform node whose script input is populated from untrusted sources

  • Confine the Canvas and agent runtime behind authentication and network segmentation

  • Add log and IDS detection for Jinja metacharacters and Python attribute-walking patterns

  • Run RAGFlow inside a hardened, least-privilege container with restricted egress

  • Validate or strip template-engine syntax from user-controlled inputs at the application gateway

advisory medium CVE-2026-143864
·
← Back to Writeups