Langroid: SQLChatAgent dangerous-function blocklist can be bypassed with quoted or schema-qualified pg_read_file calls
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Attack requirements
- None
- Impact type
- SQL injection
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA and GitHub. Impact type from CWE-89.
Summary
Langroid is a framework for building large-language-model-powered applications. Prior to version 0.65.1, the `SQLChatAgent` SQL-injection mitigation, with default `allow_dangerous_operations=False`, combines a raw-text regex blocklist (`_DANGEROUS_SQL_PATTERNS`) with a `sqlglot` SELECT-only statement allowlist. The blocklist entries that target callable functions require the function name to be immediately followed by `\s*\(`. PostgreSQL accepts the same call with the name separated from `(` by a quoted identifier, an inline comment, or schema qualification. These forms evade the regex, still parse as `SELECT`, and execute the same PostgreSQL function. This restores the `pg_read_file` server-side file-read primitive that the prior CVE-2026-25879 / GHSA-pmch-g965-grmr fix was meant to block: the parent advisory fixed a missing `pg_read_file` blocklist entry, while this report shows that the added regex is bypassable. Version 0.65.1 fixes the issue.
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.65.1 | 0.65.1 | Patch available | CNA |
| — | langroid (PyPI) | before 0.65.1 | 0.65.1 | Patch available | GHSA-6xc5-4r68-67fc |
- langroid Vendorlangroid Affected before 0.65.1 Fixed in 0.65.1 Patch available CNA
- langroid (PyPI) Vendor— Affected before 0.65.1 Fixed in 0.65.1 Patch available GHSA-6xc5-4r68-67fc
Remediation
- Fix · CNA langroid (langroid) Fixed in 0.65.1
- Fix · GHSA-6xc5-4r68-67fc langroid (PyPI) Fixed in 0.65.1 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2026-54760
- 2026-10-03 Alias added: GHSA-6xc5-4r68-67fc
- 2026-10-19 EPSS moved to the 50th–90th 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-20919 Langroid has Prompt to SQL Injection, Leading to RCE CVSS 3.1CRITICAL 9.8
- 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-2025-29397 Langroid Vulnerable to XXE Injection via XMLToolMessage CVSS 4.0HIGH 7.8
Sources
- CVE-2026-54760 · CVE Program
- CVE-2026-54760 · NVD
- FIRST EPSS
- GHSA-6xc5-4r68-67fc · 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