External risk intelligence

Langroid SQL Injection Leading to Database Host RCE.

CVE advisorySeverity: CRITICAL (CVSS 9.8)

CVE-2026-25879

Langroid is a framework for LLM-powered applications. This vulnerability requires the SQLChatAgent to be configured with over-privileged database roles. Exploitation depends on whether the specific application allows LLM-influenced SQL execution and uses dangerous database settings. While severe, exploitability is contingent on the developer's custom architecture and database configuration.

SQL Injection

Halo Surface Signal: 3 out of 5 — possibly public-facing.

External exposure likelihood

Horizon Alert

Summary of the vulnerability and why it matters

This advisory concerns a critical vulnerability in the Langroid framework, specifically within its SQLChatAgent component. When this agent is configured with database privileges that allow code or file system execution, and an attacker can influence the input provided to the agent, they may be able to execute arbitrary commands on the database host. This could lead to a significant compromise of the database server.

  • LLM app input can run commands on databases.
  • Sensitive data and systems at risk if exploited.
  • Confirm if your LLM apps use this, and how they are configured.

Attack Path

How an attacker could exploit the issue

An attacker could exploit this vulnerability by influencing the input provided to an LLM within a Langroid application. If the application uses the SQLChatAgent and this agent is configured with a database that has elevated privileges, such as the ability to execute server programs or access the filesystem, the attacker can manipulate the LLM's output to generate malicious SQL commands. These commands could then be executed by the database, potentially leading to remote code execution on the database host.

  • Attacker influences LLM input.
  • SQLChatAgent executes crafted SQL commands.
  • Enables remote code execution.

Live Threat

Current exploitation, exposure, and threat context

When the SQLChatAgent in Langroid is configured with database roles that allow code execution or filesystem access, and when an attacker can influence the agent's input, it may lead to the execution of arbitrary commands on the database host. This is dependent on the specific database dialect and the attacker's ability to shape the data processed by the LLM.

  • Database host filesystem and code execution.
  • Attacker influences LLM input to agent.
  • Remote code execution on database host.

Operational Fix

Recommended remediation, mitigation, and detection steps

This vulnerability impacts applications using the Langroid framework's SQLChatAgent, particularly when configured with database roles granting elevated privileges. The first practical step is for application owners and infrastructure teams to identify where SQLChatAgent is deployed, assess its reachability and criticality, and confirm the database role configurations. This will help determine the scope of the risk and prioritize remediation efforts, which may involve coordinating with vendor management for framework updates or implementing temporary risk-reduction measures if direct patching is not immediately feasible.

  • Identify affected applications and accountable owners.
  • Verify database role privileges and SQL execution.
  • Plan remediation based on confirmed exposure.

Supplementary metadata

Validate whether this threat affects your internet-facing exposure.

Halo Threat Intelligence helps prioritize remediation with Halo Surface Signal and H/A/L/O context. Start exposure validation with a free external attack surface trial.

Frequently asked questions

What is the Langroid framework?

Langroid is a software framework designed for developers to build applications powered by large language models. It provides abstractions like the SQLChatAgent, which helps these applications interact with databases by enabling an LLM to generate and execute SQL queries based on user inputs or conversational data.

What does CWE-89 and CWE-94 mean for CVE-2026-25879?

These represent common vulnerability classes: CWE-89 refers to SQL injection, where malicious SQL commands are inserted into queries, and CWE-94 refers to improper control of code execution. In CVE-2026-25879, these combine when an LLM is tricked into generating SQL that includes system-level commands, allowing it to bypass intended database constraints and execute unauthorized code on the underlying host.

How does an attacker trigger this vulnerability?

An attacker triggers this by influencing the data sent to the LLM, which the SQLChatAgent then processes. It is important to note that the vulnerability does not trigger if the database role is restricted to standard read/write operations; it specifically requires the agent to be connected with high-level administrative privileges, such as those that allow the database to interact directly with the host filesystem or execute external programs.

Is my application at risk based on Halo Surface Signal?

Halo Surface Signal identifies this as a potential risk, but exploitability depends on your specific architecture. Because the SQLChatAgent must be configured with dangerous, over-privileged database roles to achieve code execution, applications using the default or least-privileged database configurations are significantly less likely to be impacted by this issue.

How do I secure my systems against this CVE?

The most effective first step is to update to Langroid version 0.63.0 or later, which introduces a safer default allowlist for SQL operations. If updating is not immediately possible, audit your SQLChatAgent deployments to verify that the database roles used are strictly limited to necessary read/write tasks and do not possess administrative permissions that permit code or filesystem access.

References