Skip to content
CriticalVulnerabilityLLM-specific

GHSA-mxfr-6hcw-j9rq: Langroid has Prompt to SQL Injection, Leading to RCE

Published
Record updated
View JSON
Affected
  • langroid < 0.63.0
Fixed in
0.63.0
Known exploitation
Not listed in the CISA Known Exploited Vulnerabilities catalog at the last check.
EPSS
0.7%

Summary

Langroid versions before 0.63.0 let SQLChatAgent run SQL that an LLM generates from input it can be steered to take, including data returned to the model. When the configured database role holds privileges such as PostgreSQL pg_execute_server_program, MySQL FILE, or MSSQL xp_cmdshell, an attacker can use dialect-specific primitives like COPY ... FROM PROGRAM to execute commands on the database host. The advisory's proof of concept shows execution of the id command through this path.

Mitigation

Fixed in vX.Y by defaulting SQLChatAgent to a SELECT-only sqlglot-parsed statement allowlist with a dialect-aware dangerous-pattern blocklist. Setting allow_dangerous_operations=True restores the previous unrestricted behavior, intended only for trusted deployments.