Skip to main content
Mallory
CriticalPublic exploit

RCE via prompt-injected SQL execution in Langroid SQLChatAgent

IdentifiersCVE-2026-25879CWE-94· Improper Control of Generation of…

CVE-2026-25879 affects Langroid prior to version 0.63.0. The vulnerable component is SQLChatAgent, which executes SQL generated by an LLM. Because the LLM output is influenceable through prompt injection, including indirectly through untrusted data returned to the model, an attacker can cause the agent to emit and execute attacker-directed SQL statements. In deployments where the configured database role has dangerous privileges that permit operating-system command execution or filesystem interaction, this can be escalated beyond database query manipulation to host-level code execution. The advisory specifically cites dialect-specific primitives such as PostgreSQL COPY ... FROM PROGRAM, as well as privilege-dependent capabilities like PostgreSQL pg_execute_server_program, MySQL FILE, and Microsoft SQL Server xp_cmdshell. The issue was fixed in Langroid 0.63.0 by changing SQLChatAgent to default to a SELECT-only allowlist enforced via sqlglot parsing, combined with a dialect-aware dangerous-pattern blocklist.

Share:
For your environment

Are you exposed to this one?

Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.

ANALYST BRIEF

Impact, mitigation & remediation

What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.

Impact

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

Successful exploitation can allow an attacker to coerce SQLChatAgent into executing arbitrary or attacker-chosen SQL against the configured database. In permissive database configurations, this can lead to remote code execution on the database host via database-native command execution features, as well as filesystem access or manipulation. Depending on the database privileges granted to the agent, impact may also include unauthorized data access, data modification or deletion, abuse of database server features, and compromise of the underlying host running the database service.

Mitigation

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

If immediate upgrade is not possible, restrict the database account used by SQLChatAgent to least privilege and remove capabilities that enable OS command execution, external program invocation, or filesystem access. Specifically avoid roles or permissions such as PostgreSQL pg_execute_server_program, MySQL FILE, and MSSQL xp_cmdshell, and disable dangerous database features where possible. Treat all LLM inputs and model-visible data as untrusted, reduce exposure to prompt injection sources, and constrain the agent to read-only database operations until the fixed version can be deployed.

Remediation

Patch, then assume compromise.

Upgrade Langroid to version 0.63.0 or later. The fix changes SQLChatAgent behavior to default to a SELECT-only sqlglot-parsed statement allowlist and adds a dialect-aware dangerous-pattern blocklist. For trusted deployments that intentionally require broader SQL execution, allow_dangerous_operations=True restores the prior unrestricted behavior, but this should only be enabled after careful risk review and with tightly constrained database privileges.
PUBLIC EXPLOITS

Exploits

No public exploits tracked yet. Mallory keeps watching.

VALID 0 / 0 TOTALView more in app

No public exploit code observed for this vulnerability.

ACTIVITY FEED

Recent activity

6 sources tracked across advisories and community write-ups. News coverage will land here when it surfaces.

No news coverage yet. Advisories and community discussion only.

What this page doesn’t show

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, which detections to deploy, and what to do tonight.
Exposure mapping

Query your assets running an affected version, and investigate the blast radius.

Threat actor evidence

Every observed campaign linking this CVE to a named adversary.

Associated malware

Malware families riding this exploit, with evidence and IOCs.

Detection signatures

YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.

Vendor-by-vendor mapping

Cross-references every affected SKU, including bundled OEM variants.

Social activity6

Community discussion across Reddit, Mastodon, and other social sources.