Langroid: SQLChatAgent dangerous-function blocklist can be bypassed with quoted or schema-qualified pg_read_file calls
CVE-2026-54760 · GHSA-6xc5-4r68-67fc · published 2026-07-06
- Severity
- Critical
- CVSS score
- 9.3
- Chance of exploitation (EPSS)
- 0.65%
- Fixed in
- 0.65.1
- Exploitation Public proof of concept
- Automatable Yes
- Technical impact Total
- CISA SSVC
On a deployment using SQLChatAgent against PostgreSQL with a role able to call pgreadfile (superuser, or a role granted pgreadserverfiles), an attacker who can influence LLM-generated SQL can coerce the agent into emitting one of the obfuscated queries and read files accessible to the PostgreSQL server process through pgreadfile. This is the same impact and precondition shape as the published pgreadfile advisory, but it targets the bypassability of the current regex-based fix rather than the pre-fix absence of a pgread_file block. Severity: High by parity with the published parent advisory; not Critical. CWE-184 leading to server-side file read.
Upgrade langroid to 0.65.1 or later.
Do not rely on raw-text regex matching for dangerous-call detection. After the existing sqlglot parse, walk the AST and reject any function invocation whose normalized, unquoted, schema-stripped, case-folded name is in a dangerous set such as pgreadfile, pgreadbinaryfile, pglsdir, pgstatfile, loimport, loexport, loadfile, or loadextension. Also recommend running SQLChatAgent with a least-privilege database role that lacks pgreadserverfiles.
| Package | Registry | Affected | Fixed in |
|---|---|---|---|
| langroid | PyPI | <= 0.65.0 | 0.65.1 |
- CriticalMCP Path Traversal Allows Full-Filesystem Read and JWT Secret Exfiltration Leading to Account Takeoverlangflow, langflow-base
- Critical@zereight/mcp-gitlab: Unauthenticated arbitrary file read via `upload_markdown` enables PAT exfiltration and full account takeover@zereight/mcp-gitlab
- CriticalFlowise RCE via SQL Database Chain Nodeflowise, flowise-components
- Criticalfast-mcp-telegram: Bearer token path traversal bypasses reserved Telegram session protectionfast-mcp-telegram
- CriticalMCP Toolbox HTTP tool path parameters allow traversal to unintended endpointsgithub.com/googleapis/mcp-toolbox
- CriticalLangflow: BaseFileComponent-based nodes arbitrary file read with RCE exploitlangflow
- CriticalLangroid: Neo4jChatAgent executes LLM-generated Cypher without validation (prompt-to-Cypher injection; config-conditional RCE), mirroring thlangroid
- CriticalLangroid: Sandbox Escape to Remote Code Execution via Incomplete `eval()` Mitigation in TableChatAgentlangroid
- CriticalLangroid has Prompt to SQL Injection, Leading to RCElangroid
- CriticalLangroid has WAF Bypass Leading to RCE in TableChatAgentlangroid
- CriticalLangroid has a Code Injection vulnerability in TableChatAgentlangroid
- HighLangroid: handle_message() executes user-supplied tool JSON without sender verificationlangroid
The impact, patch and workaround text comes from the advisory, shortened (GitHub Advisory Database, CC BY 4.0). Proof-of-concept and reproduction sections and code are left out; the original advisory has them.