CVE-2026-25879

Langroid · Langroid Framework

The Langroid framework is vulnerable to remote code execution due to insecure handling of SQL produced by large language models.

Executive summary

An insecure SQL execution vulnerability in the Langroid framework allows prompt injection to trigger remote code execution on database hosts.

Vulnerability

The SQLChatAgent component executes SQL generated by an LLM without adequate sanitization, allowing an attacker to use prompt injection to execute dialect-specific system commands (e.g., xp_cmdshell) on the database host.

Business impact

Successful exploitation allows an attacker to gain system-level access to the database server, leading to data exfiltration or total server takeover. With a CVSS score of 9.8, this flaw presents a critical risk to any application utilizing Langroid for LLM-powered database interaction.

Remediation

Immediate Action: Upgrade to Langroid v0.63.0, which implements a secure allowlist for SQL operations and blocks dangerous patterns.

Proactive Monitoring: Review database audit logs for execution of dangerous system commands or unexpected queries originating from the application service.

Compensating Controls: Ensure the database user account utilized by the application has the minimum necessary privileges, explicitly denying access to system-level commands like xp_cmdshell or FILE.

Exploitation status

Public Exploit Available: Unknown

Analyst recommendation

Frameworks integrating LLMs with database access must be configured with the principle of least privilege. Organizations should update to version 0.63.0 immediately and verify that database roles are restricted from performing administrative or system-level actions.