Documented Incident · INC-2025-27135 · High severity

RAGFlow Text-to-SQL Execution Component SQL Injection

CVE-2025-27135 disclosed a high-severity SQL injection flaw in the RAGFlow retrieval engine's automated natural-language-to-SQL execution component. Model-derived SQL fragments and user-influenced query parameters were concatenated directly into database calls without parameterized binding or abstract-syntax-tree validation. An attacker able to prompt or poison retrieval inputs could alter query semantics to read unauthorized tables, exfiltrate tenant records, or tamper with backend state depending on DB privileges. Upstream patches introduced stricter parameter handling, underscoring that generated SQL must run under read-only least-privilege database roles and AST allowlists.

Incident dossier metadata

Case ID
INC-2025-27135
Classification
Incident
Date
Severity
High
Sector
Enterprise Data & Analytics
Attack vector
Tool/MCP Abuse
System type
Open-Source RAG & Database Query Assistants
CVE / reference
CVE-2025-27135
Reference URI
https://nvd.nist.gov/vuln/detail/CVE-2025-27135

Inspect INC-2025-27135 in Interactive Incidents & Cases Hub

Defensive takeaway

Execute model-generated database queries exclusively against read-only least-privilege credentials using AST-validated SELECT allowlists and strict query timeouts.

Mapped AI security techniques

Mapped defensive controls

Source citation records