Langroid has Prompt to SQL Injection, Leading to RCE
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- SQL injection, Code execution
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-89 and CWE-94.
Summary
Langroid is a framework for building large-language-model-powered applications. Prior to version 0.63.0, SQLChatAgent executes SQL produced by an LLM, which is influenceable by prompt injection. When configured with a database role that has privileges enabling code execution or filesystem access (e.g., PostgreSQL pg_execute_server_program, MySQL FILE, MSSQL xp_cmdshell), an attacker who can shape the agent's input — including indirectly via data returned to the LLM — can coerce execution of dialect-specific primitives such as `COPY ... FROM PROGRAM`, achieving RCE on the database host. Fixed in v0.63.0 by defaulting SQLChatAgent to a SELECT-only sqlglot-parsed statement allowlist with a dialect-aware dangerous-pattern blocklist; allow_dangerous_operations=True restores the previous unrestricted behavior for trusted deployments.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- Yes
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| langroid | langroid | before 0.63.0 | 0.63.0 | Patch available | CNA |
| — | langroid (PyPI) | before 0.63.0 | 0.63.0 | Patch available | GHSA-mxfr-6hcw-j9rq |
- langroid Vendorlangroid Affected before 0.63.0 Fixed in 0.63.0 Patch available CNA
- langroid (PyPI) Vendor— Affected before 0.63.0 Fixed in 0.63.0 Patch available GHSA-mxfr-6hcw-j9rq
Remediation
- Fix · CNA langroid (langroid) Fixed in 0.63.0
- Fix · GHSA-mxfr-6hcw-j9rq langroid (PyPI) Fixed in 0.63.0 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2026-25879
- 2026-10-03 Alias added: GHSA-mxfr-6hcw-j9rq
- 2026-10-25 EPSS moved to the below the 50th percentile
References
More langroid vulnerabilities
- TI-2026-39575 Langroid: Sandbox Escape to Remote Code Execution via Incomplete `eval()` Mitigation in TableChatAgent CVSS 3.1CRITICAL 10.0
- TI-2026-20592 Langroid has WAF Bypass Leading to RCE in TableChatAgent CVSS 4.0CRITICAL 9.4
- TI-2025-29395 Langroid has a Code Injection vulnerability in TableChatAgent CVSS 3.1CRITICAL 9.8
- TI-2026-40145 Injection in langroid CVSS 4.0CRITICAL 9.2
- TI-2026-39566 Langroid: SQLChatAgent dangerous-function blocklist can be bypassed with quoted or schema-qualified pg_read_file calls CVSS 4.0CRITICAL 9.3
- TI-2025-29397 Langroid Vulnerable to XXE Injection via XMLToolMessage CVSS 4.0HIGH 7.8
Sources
- CVE-2026-25879 · CVE Program
- CVE-2026-25879 · NVD
- FIRST EPSS
- GHSA-mxfr-6hcw-j9rq · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences