RAGFlow RCE Vulnerabilities Leave 1,918 Servers Exposed
1,918 RAGFlow instances exposed to critical RCE vulnerabilities. Discover unpatched flaws in remote code execution handling that compromise entire systems.
A Pattern of Remote Code Execution in One of the Most Popular RAG Frameworks
RAGFlow, the open-source Retrieval-Augmented Generation engine by InfiniFlow, has accumulated a troubling series of critical security flaws over the past eighteen months. Several remain unpatched. The vulnerabilities share a common thread: unsafe handling of user-controlled input — through eval(), unsandboxed Jinja2 templates, pickle deserialization, and path traversal — each one leading to full remote code execution on the host server.
For any team running RAGFlow in production or staging, this is not a theoretical concern. According to Zeropath's disclosure, Shodan scans show at least 1,918 RAGFlow instances directly accessible on the public internet. Many likely run default configurations, including Docker containers that operate as root.
Put simply: a single authenticated user — or in some cases, an unauthenticated attacker — can take full control of the server hosting RAGFlow.
Five Distinct RCE Vectors — A Timeline
Before diving into the technical details, here is the landscape of known RAGFlow RCE vulnerabilities sorted by disclosure date:
| CVE | Disclosure | CVSS | Vector | Auth Required | Patched |
|---|---|---|---|---|---|
| CVE-2024-12433 | Apr 2026 (published) | — | Hard-coded key + pickle deser. | No | Partial (v0.14.0) |
| CVE-2025-68700 | Dec 2025 | 9.9 | CodeExec eval() |
Yes (low-priv) | No |
| CVE-2026-24770 | Jan 2026 | 9.8 | Zip Slip in MinerU parser | No | Yes (commit fix) |
| CVE-2026-28797 | 2026 | 8.7 (CVSS 4.0) | SSTI via Jinja2 | Yes (low-priv) | No |
| GHSA-vw46-rrp3-c99v | Mar 2026 | — | Tag-reranking eval() |
Yes (low-priv) | No |
Three of these five have no publicly available patch as of April 2026. That is the core problem.
The Tag-Reranking eval() Flaw — Unpatched Since March 2026
The most recently disclosed vulnerability, reported by Zeropath, targets the _rank_feature_scores() function in RAGFlow version 0.24.0. This function retrieves stored tag data from chunk storage and passes it directly to Python's eval():
The code reads a value from the database search results and converts it to a Python dictionary using eval() without any sanitization. If an attacker can control the stored string — which is possible for any authenticated user who can upload and process documents — they control what eval() executes.
There are important conditions. The vulnerability only triggers on RAGFlow instances configured to use Infinity as the chunk storage backend. Elasticsearch and other backends use different code paths that do not invoke eval() for tag reranking.
The initial security report (GitHub advisory GHSA-vw46-rrp3-c99v) was filed on March 3, 2026. After a full month with no response from maintainers, the researcher submitted a public patch on April 8, 2026. As of this writing, the patch has not been merged.
Honest take: A month-long silence on a critical RCE report is a red flag for any project's security posture, regardless of how good the core product is.
CVE-2025-68700: CodeExec Component — CVSS 9.9
Disclosed in December 2025 by bilisheep of the Xmirror Security Team, this vulnerability targets the Agent workflow's Canvas CodeExec component. According to the GitHub advisory (GHSA-8xw3-v6c2-j84j), the file agent/tools/code_exec.py contains a line where user-controlled stdout output is passed directly to eval().
The exploitation is straightforward: a low-privileged authenticated user submits a CodeExec script that prints a carefully crafted string. When the backend processes the output, eval() executes the embedded payload. The researcher demonstrated this by running an id command on the host through a single print statement.
With an estimated CVSS score of 9.9, this is among the most severe vulnerabilities in the RAG framework ecosystem. No patched version exists.
What makes this particularly dangerous in a business context: the CodeExec component is a core part of RAGFlow's Agent workflow feature. Teams that built custom AI agents using RAGFlow's visual canvas are directly exposed.
CVE-2026-24770: Zip Slip — No Authentication Required
Unlike the previous two flaws, this one does not even require the attacker to log in. Disclosed in January 2026 with a CVSS score of 9.8, CVE-2026-24770 is a classic Zip Slip path traversal vulnerability in the MinerUParser class.
The _extract_zip_no_root function, as described by SentinelOne's vulnerability database, performs no filename sanitization on ZIP archive contents. An attacker crafts a malicious ZIP containing files with path traversal sequences (like ../../etc/cron.d/malicious), and the extraction logic writes them wherever the sequences point — including system directories.
Since RAGFlow Docker containers commonly run as root, a successful Zip Slip attack can overwrite any file on the system. Combined with cron job injection or SSH key placement, this leads directly to persistent remote code execution.
Real numbers: According to PulsePatch's analysis, this vulnerability scores 9.0/10 on exploitability — meaning low complexity, no authentication, no user interaction required.
The good news: a fix exists in commit 64c75d558e4a17a4a48953b4c201526431d8338f, which adds path sanitization to the extraction function. Teams using the MinerU parser should verify they are running a version that includes this commit.
CVE-2026-28797: Server-Side Template Injection via Jinja2
RAGFlow's Agent workflow includes Text Processing (StringTransform) and Message components that render user-supplied templates. According to the NVD entry for CVE-2026-28797, these components use Python's jinja2.Template in unsandboxed mode.
Jinja2 without sandboxing is a well-known SSTI vector. Any authenticated user can craft a template that accesses Python's internal classes and executes arbitrary operating system commands on the server. The CVSS 4.0 base score is 8.7 (HIGH), and as the NVD states, "there are no publicly available patches."
This vulnerability affects RAGFlow versions 0.24.0 and prior — essentially every released version. The OpenCVE listing confirms the CVSS v3.1 score of 8.8.
For teams building multi-tenant RAG applications where different users create and configure agents, this is especially critical. Any user with access to the Agent workflow editor can escalate to full server control.
CVE-2024-12433: Hard-Coded Credentials and Pickle Deserialization
The oldest entry in this list, documented by SentinelOne, combines two classic security anti-patterns: a hard-coded authentication key and unsafe deserialization.
RAGFlow versions prior to v0.14.0 shipped with a hard-coded RPC authentication key (authkey=binfiniflow-token4kevinhu). This key, combined with Python's pickle.loads() on untrusted network input, gave any network-adjacent attacker unauthenticated remote code execution.
The attack requires no user interaction and no prior privileges. The vulnerability was reported through the Huntr Bug Bounty Program and a fix was released in v0.14.0. However, any team still running earlier versions — and given the slow upgrade cycles typical of self-hosted AI tooling, many likely are — remains exposed.
Why This Matters for Businesses Running RAG Infrastructure
RAGFlow is not a niche experiment. It is one of the most-starred open-source RAG frameworks, and organizations deploy it to process sensitive documents — contracts, financial records, internal knowledge bases, customer data. A compromised RAGFlow instance means:
- Data exfiltration: Every document fed into the RAG pipeline is accessible to the attacker. If the system processes proprietary or regulated data, this becomes a compliance incident.
- Lateral movement: RAGFlow typically connects to databases (PostgreSQL, Elasticsearch, Infinity) and may share a Docker network with other services. A reverse shell from a compromised RAGFlow container can reach adjacent infrastructure.
- Supply chain risk: If RAGFlow generates outputs consumed by other systems — customer-facing chatbots, internal decision tools — an attacker can manipulate those outputs.
Key takeaway for business: The risk is not just "someone hacks our AI tool." The risk is that someone uses the AI tool as a door into everything it connects to.
What This Means for Your Project
Teams evaluating or already running RAGFlow face a practical decision. The framework offers strong RAG capabilities, but the security track record demands active risk management.
Immediate Steps
Here is what we recommend for teams currently running RAGFlow:
Audit your exposure. Check whether your instance is reachable from the public internet. If it appears on Shodan, it is already being scanned. Place RAGFlow behind a VPN or private network immediately.
Check your chunk storage backend. The tag-reranking
eval()flaw only fires when using Infinity. If you are on Elasticsearch, that specific vector does not apply — but the other four do.Verify your version against known fixes. The Zip Slip vulnerability (CVE-2026-24770) has a committed fix. Confirm your deployment includes commit
64c75d55. For CVE-2024-12433, ensure you are on v0.14.0 or later.Restrict Agent workflow access. Both the CodeExec
eval()flaw and the Jinja2 SSTI require authenticated users to interact with the Agent workflow. Limit who can create and edit agents. If you do not use the Agent feature, disable it entirely if possible.Do not run as root. If your RAGFlow Docker container runs as root (the default in many configurations), a successful exploit gives the attacker root-level file system access. Configure the container to run as a non-root user and apply read-only filesystem mounts where feasible.
Network-segment the deployment. RAGFlow should not share an unrestricted Docker network with databases, cache servers, or other critical infrastructure. Use Docker network policies to limit what the RAGFlow container can reach.
Evaluating Alternatives
For teams in early stages of RAG adoption, the pattern of unpatched vulnerabilities raises a legitimate question about whether to proceed with RAGFlow or evaluate alternatives. The decision depends on context:
- If document processing involves regulated or highly sensitive data, the current unpatched state of three critical RCE flaws should weigh heavily against deployment.
- If the deployment is internal-only, behind a VPN, with trusted users and no exposure to untrusted document uploads, the risk can be managed with the controls described above.
- If the primary use case does not require the Agent workflow (the source of two of the five vulnerabilities), disabling that feature reduces the attack surface significantly.
Honest take: An open-source project with multiple CVSS 9+ vulnerabilities and month-long silences on security reports needs a stronger security response process before enterprises should depend on it for sensitive workloads.
The Bigger Picture — eval() Is Not a Parsing Strategy
Three of the five vulnerabilities documented here stem from the same root cause: using Python's eval() to process data that originates from user input or stored content. This is not a subtle, hard-to-catch class of bug. It is a well-documented anti-pattern that security linters flag automatically.
The Jinja2 SSTI vulnerability follows a similar logic — rendering user-supplied templates without sandboxing is the template-engine equivalent of calling eval() on user input.
For development teams building AI infrastructure, this is a cautionary pattern. The rush to ship RAG features can lead to shortcuts in input handling that would never pass review in a traditional web application. AI infrastructure deserves the same security rigor as any other server-side system.
Put simply: if a function processes data that a user can influence, eval() is never the right tool. ast.literal_eval(), explicit parsers, or structured deserialization exist for exactly this reason.
Frequently Asked Questions
How does the tag-reranking code path trigger eval() execution of stored strings?
The _rank_feature_scores() function reads tag field values from chunk storage search results and passes them to Python's eval() to convert them into dictionaries. If an attacker uploads a document containing a malicious payload string in the tag field, that string executes as Python code when the retrieval pipeline processes it during reranking. This only activates when Infinity is the configured chunk storage backend.
Why does RAGFlow run as root in Docker containers and what are the breach implications?
Many RAGFlow Docker deployment configurations default to running the application process as root inside the container. This means any exploit that achieves code execution — whether through eval(), Zip Slip, or SSTI — operates with root-level permissions, allowing the attacker to read and write any file, install persistence mechanisms, and potentially escape the container if additional misconfigurations exist.
What specific conditions must be met on the retrieval side to activate the RCE vulnerability?
For the tag-reranking eval() flaw (GHSA-vw46-rrp3-c99v), three conditions must align: the RAGFlow instance must use Infinity as the chunk storage backend, the attacker must be able to upload and process documents (requiring low-privilege authentication), and a subsequent search query must trigger the reranking code path that calls eval() on the stored tag data.
How does Infinity chunk storage configuration expand the attack surface?
Infinity's storage format returns tag field data as strings that RAGFlow converts to Python dictionaries using eval(). Other backends like Elasticsearch return structured data that does not require this conversion step. Teams using Infinity face this additional attack vector that Elasticsearch users do not, though both are exposed to the other four RCE vulnerabilities.
Can a reverse shell access other services and databases in the same Docker network?
Yes. By default, Docker Compose deployments place all defined services on a shared bridge network. A reverse shell from a compromised RAGFlow container can reach PostgreSQL, Redis, Elasticsearch, and any other service in the same docker-compose.yml without additional authentication if those services trust connections from the internal network — which is the common configuration for development and many production setups.
This article is based on publicly available sources and may contain inaccuracies.


