Skip to main content
Mallory
HighPublic exploitVulnerability

CVE-2026-28797: Authenticated Server-Side Template Injection in RAGFlow Agent Workflows

Published Apr 3, 2026 · Updated today
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 days7 mentions · peak 2 in a dayToday
CVSS8.7High · v4
EPSS0.59%42nd percentile
CISA KEVNoNot listed
In the wildReported1 exploitation record in Mallory
Vendor
Infiniflow
IdentifiersCVE-2026-28797CWE-1336 · Improper Neutralization of Special…

CVE-2026-28797 is a server-side template injection vulnerability affecting RAGFlow versions 0.24.0 and earlier. The Agent workflow Text Processing (StringTransform) and Message components render user-supplied templates using Python's unsandboxed jinja2.Template. An authenticated user can submit a crafted template that accesses Python objects and executes arbitrary operating system commands in the RAGFlow service context. Administrative privileges and additional user interaction are not required.

Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Analyst brief

Impact, mitigation & remediation

What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation compromises the confidentiality, integrity, and availability of resources accessible to the RAGFlow service. Attackers can execute commands, read application data and provider credentials, modify application behavior, and disrupt the service. Further compromise depends on the service account's privileges, accessible secrets, and network access; host-level administrative access is not inherently guaranteed.

Mitigation

If you can’t patch tonight, do this now.

Until remediation is verified, disable or restrict access to the affected workflow components and prevent untrusted users from submitting templates. Disable public self-registration and limit application access to trusted users through network and authentication controls. Run RAGFlow with least privilege, restrict outbound connectivity, and monitor for application-originated shell execution, unexpected application modifications, and unusual access to secrets. Rotate exposed credentials if compromise is suspected.

Remediation

Patch, then assume compromise.

Upgrade to a release that replaces unsandboxed template rendering in both affected components with appropriately sandboxed rendering. RAGFlow 0.25.0, released April 21, 2026, is reported to introduce the recommended sandbox, although the original advisory lists no patched version. Verify that the deployed release protects both StringTransform and Message template evaluation rather than relying solely on the advisory's patch status.

Public exploits

Exploits

1 exploit validated by Mallory's analysis.

View more in app →
ragflow-auditThis repository is a small standalone Python audit/exploitation tool for three RAGFlow vulnerabilities. It contains a README with usage and vulnerability background plus a single executable script, `ragflow-audit.py`, implemented entirely with Python standard library modules (`argparse`, `urllib`, `zipfile`, etc.). The script exposes three subcommands: 1. `ssti`: an authenticated web exploit for CVE-2026-28797. It builds a malicious RAGFlow canvas DSL targeting either the `StringTransform` or `Message` component, submits it to `/v1/canvas/set`, then triggers execution via `/v1/canvas/completion`. The embedded Jinja2 payload runs `os.popen("id")` on the server. Success is determined by parsing the response for `uid=`. A newline-based alternate payload is included to bypass a regex-based filter. 2. `zipslip`: an offline detector for CVE-2026-24770. It does not exploit a remote service directly; instead it inspects ZIP entries for traversal (`..`), absolute paths, and symlink entries that could lead to Zip Slip during extraction. 3. `apikey`: a helper for CVE-2025-69286. It decodes a share `beta` token, attempts to recover the UUID body, then brute-forces candidate `time_low` values to generate possible `ragflow-...` API tokens. The script does not automatically validate candidates against a live target, but the README and comments explain that real exploitation would test each candidate token against authenticated API endpoints and distinguish success by HTTP 200 vs 401. Overall, this is a real exploit/audit utility rather than a framework module. Its strongest capability is authenticated SSTI-to-RCE against vulnerable RAGFlow instances. The ZIP functionality is detection-only and local. The API-key functionality is an operational derivation aid but stops short of full automated online exploitation.qianlijaingshan · Disclosed Aug 11, 2026 · python · markdown · web · fileOperational
Exposure surface

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
InfiniflowRagflowapplication
FAQ

Frequently asked questions

Is CVE-2026-28797 exploited in the wild?
Yes. As of Nov 28, 2026, Mallory has reports of exploitation in the wild.
Is there a public exploit for CVE-2026-28797?
Yes. Mallory tracks 1 public exploit or proof of concept for CVE-2026-28797, the earliest disclosed Aug 11, 2026.
Is there a patch for CVE-2026-28797?
Upgrade to a release that replaces unsandboxed template rendering in both affected components with appropriately sandboxed rendering. RAGFlow 0.25.0, released April 21, 2026, is reported to introduce the recommended sandbox, although the original advisory lists no patched version.
What products are affected by CVE-2026-28797?
Infiniflow Ragflow.
How severe is CVE-2026-28797?
CVE-2026-28797 has a CVSS v4 score of 8.7 (High) and an EPSS score of 0.59% (42nd percentile) as of Nov 28, 2026.
Activity feed

Recent activity

15 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.

View more in app →
the hacker newsNews · Nov 23, 2026AI-Assisted Cyberattacks Trigger Unauthorized Payments at Indian Banks and Fintech FirmsA vulnerability in RAGFlow referenced among targets of an AI-assisted credential-theft campaign. The content does not describe its technical mechanism or confirm successful exploitation of this specific vulnerability.Read more ↗spectrum security threatsNews · Nov 17, 2026ARTEX self-funding AI key theft threat: detection, logs and IOCsA RAGFlow vulnerability reportedly exploited by autonomous ARTEX agents in a campaign stealing AI-provider API keys to fund further attacks. The content does not describe the vulnerability's technical mechanism. Amazon could not independently verify agent-reported outcomes outside its monitored systems.Read more ↗cysecurity newsNews · Nov 17, 2026Amazon Detects Campaign Targeting AI Infrastructure and Developer Credentials - CySecurity News - Latest Information Security and Hacking IncidentsA RAGFlow vulnerability highlighted for exposure review in reporting on AI-agent campaigns targeting exposed AI applications. The cited advisory provides no patch; organizations are directed to follow project security guidance. The content does not describe the technical mechanism or confirm exploitation of this specific CVE.Read more ↗security affairsNews · Nov 16, 2026ARTEX: How Cybercriminals Use AI Agents to Scale Their AttacksA known RAGFlow vulnerability sought by ARTEX-driven AI agents during a campaign targeting AI-service credentials. The article does not describe the flaw's technical mechanism or establish successful exploitation; Amazon assessed campaign records rather than observing the attacks directly.Read more ↗
+6 more in the timeline. Sign up to see them
Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Mallory platform

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, and which detections to deploy tonight.
Exposure mappingQuery your assets running an affected version, and investigate the blast radius.
Threat actor evidenceEvery report linking this CVE to a named adversary.
Associated malware1Malware families linked to this CVE, with evidence and IOCs.
Detection signaturesYARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Vendor-by-vendor mappingCross-references every affected SKU, including bundled OEM variants.
Social activity5Community discussion across Reddit, Mastodon, and other social sources.