The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2026-28797

CVE-2026-28797: RAGFlow SSTI Remote Code Execution Flaw

CVE-2026-28797 is a Server-Side Template Injection vulnerability in RAGFlow's Agent workflow that enables remote code execution. Authenticated users can exploit unsandboxed jinja2 templates to run OS commands on the server.

Published: April 10, 2026

CVE-2026-28797 Overview

CVE-2026-28797 is a Server-Side Template Injection (SSTI) vulnerability affecting RAGFlow, an open-source Retrieval-Augmented Generation (RAG) engine. The vulnerability exists in RAGFlow's Agent workflow components, specifically the Text Processing (StringTransform) and Message components. These components utilize Python's jinja2.Template without sandboxing to render user-supplied templates, enabling any authenticated user to execute arbitrary operating system commands on the server.

Critical Impact

Authenticated attackers can achieve full remote code execution on servers running RAGFlow versions 0.24.0 and prior through malicious Jinja2 template injection, potentially leading to complete system compromise.

Affected Products

  • RAGFlow version 0.24.0 and all prior versions
  • RAGFlow Agent workflow Text Processing (StringTransform) component
  • RAGFlow Agent workflow Message component

Discovery Timeline

  • 2026-04-03 - CVE-2026-28797 published to NVD
  • 2026-04-07 - Last updated in NVD database

Technical Details for CVE-2026-28797

Vulnerability Analysis

This vulnerability represents a classic Server-Side Template Injection (SSTI) flaw stemming from the unsafe use of Jinja2 templating in RAGFlow's Agent workflow components. Jinja2 is a powerful Python templating engine that, when used without proper sandboxing, allows template authors to access Python objects and execute arbitrary code.

The Text Processing (StringTransform) and Message components in RAGFlow accept user-controlled template strings and pass them directly to jinja2.Template() for rendering. Since no sandboxing or input restrictions are applied, an authenticated attacker can craft malicious templates that leverage Jinja2's introspection capabilities to escape the template context and execute system commands.

The attack can be performed by any authenticated user, meaning that even low-privileged accounts can exploit this vulnerability to achieve remote code execution with the privileges of the RAGFlow server process.

Root Cause

The root cause of this vulnerability is the use of Python's unsandboxed jinja2.Template class to render user-supplied template strings. The vulnerable components fail to implement Jinja2's SandboxedEnvironment or other security controls that would restrict template capabilities. This allows attackers to use Jinja2's template syntax to traverse Python's object hierarchy and access dangerous functions like os.system(), subprocess.Popen(), or other code execution primitives.

Attack Vector

The attack is network-based and requires only low-privilege authentication to the RAGFlow application. An attacker must authenticate to the RAGFlow instance and then interact with either the Text Processing (StringTransform) or Message components within the Agent workflow functionality. By submitting a specially crafted Jinja2 template containing Python object introspection and method calls, the attacker can break out of the template sandbox and execute arbitrary operating system commands.

Typical SSTI payloads leverage Jinja2's ability to access Python's __class__, __mro__, __subclasses__, and __globals__ attributes to traverse the object hierarchy and locate dangerous classes or functions. Once located, these can be invoked to execute system commands or read sensitive files from the server.

The vulnerability mechanism involves injecting malicious Jinja2 template syntax that exploits Python's object introspection capabilities. Attackers typically traverse from string objects through __class__.__mro__ to locate base classes, then use __subclasses__() to find classes with file system or command execution capabilities. For detailed technical analysis, refer to the GitHub Security Advisory.

Detection Methods for CVE-2026-28797

Indicators of Compromise

  • Unusual template syntax patterns in Agent workflow inputs containing Python introspection attributes such as __class__, __mro__, __subclasses__, or __globals__
  • Web application logs showing requests to Agent workflow endpoints with encoded or obfuscated template payloads
  • Unexpected child processes spawned by the RAGFlow server process
  • System command execution logs showing commands initiated by the RAGFlow application user account

Detection Strategies

  • Implement web application firewall (WAF) rules to detect common SSTI payload patterns in HTTP requests, particularly those containing Jinja2 template syntax with Python introspection keywords
  • Monitor RAGFlow application logs for template rendering errors or exceptions that may indicate exploitation attempts
  • Deploy endpoint detection and response (EDR) solutions to identify anomalous process execution chains originating from the RAGFlow server process
  • Configure intrusion detection systems (IDS) to alert on network traffic containing SSTI-related patterns

Monitoring Recommendations

  • Enable verbose logging for the RAGFlow Agent workflow components to capture all user-supplied template inputs
  • Implement real-time alerting for any template processing that includes suspicious patterns like {{, {%, combined with Python dunder methods
  • Monitor system process creation events for unexpected command execution by the RAGFlow application service account
  • Review authentication logs for unusual access patterns to Agent workflow functionality

How to Mitigate CVE-2026-28797

Immediate Actions Required

  • Restrict network access to RAGFlow instances to trusted users and networks only until a patch is available
  • Implement application-level input validation to block template strings containing dangerous patterns such as __class__, __mro__, __subclasses__, and __globals__
  • Consider disabling the Agent workflow Text Processing (StringTransform) and Message components if they are not essential to operations
  • Review authentication logs and audit user accounts with access to Agent workflow functionality

Patch Information

At the time of publication, there are no publicly available patches for this vulnerability. Organizations should monitor the RAGFlow GitHub repository for security updates and apply patches immediately when they become available.

Workarounds

  • Deploy a web application firewall (WAF) with rules specifically designed to block Jinja2 SSTI payloads targeting the Agent workflow endpoints
  • Implement network segmentation to isolate RAGFlow instances from critical infrastructure and limit the blast radius of potential compromise
  • Apply the principle of least privilege by restricting access to Agent workflow features to only users who require this functionality
  • Consider running RAGFlow in a containerized environment with restricted capabilities to limit the impact of successful exploitation
bash
# Example: Network isolation using iptables
# Restrict access to RAGFlow service port to trusted networks only
iptables -A INPUT -p tcp --dport 9380 -s 10.0.0.0/8 -j ACCEPT
iptables -A INPUT -p tcp --dport 9380 -j DROP

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechRagflow

  • SeverityHIGH

  • CVSS Score8.7

  • EPSS Probability0.08%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-20
  • Technical References
  • GitHub Security Advisory
  • Related CVEs
  • CVE-2026-24770: RAGFlow MinerU Parser RCE Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English