CVE-2026-54760
CriticalCVSS 9.3Exploitation Probability (EPSS)
Low risk47th percentile - higher than 47% of all known CVEs
Summary
In Langroid framework prior to version 0.65.1, a SQL injection vulnerability was found in the `SQLChatAgent` component. Despite default dangerous operations being disabled, the protection mechanism using a regex blocklist and SELECT allowlist can be bypassed with crafted PostgreSQL queries, enabling server file reads.
Risk Assessment
An attacker can bypass security controls and execute PostgreSQL functions like `pg_read_file`, leading to unauthorized file reads on the database server. This could result in exposure of sensitive data, including configuration and user information.
Recommendation
Immediately update Langroid to version 0.65.1 or later. Additionally, implement extra security layers such as query validation on the database server side.
Other vulnerabilities in Langroid
See all- CVE-2026-55615Critical
Langroid before version 0.65.5 has a vulnerability in the Neo4jChatAgent component that allows Cypher query injection. An attacker can influence the query via prompt injection, enabling reading or destroying all graph data, and with APOC or dbms.security procedures enabled, achieving OS command and filesystem access.
- CVE-2026-54769Critical
Langroid versions prior to 0.65.2 contain a critical sandbox escape vulnerability leading to Remote Code Execution (RCE) in its `TableChatAgent` and `VectorStore` components. When evaluating LLM-generated tool messages with `full_eval=True`, the `eval()` function fails to remove `__builtins__` from the globals dictionary, allowing access to system functions like `__import__('os').system()`. An attacker can exploit this by providing a crafted prompt to achieve unauthenticated RCE on the host.
- CVE-2026-25879Critical
Langroid SQLChatAgent before version 0.63.0 executes SQL generated by an LLM, which is influenceable by prompt injection. An attacker can coerce execution of dangerous operations like COPY ... FROM PROGRAM, leading to remote code execution on the database host.
- CVE-2026-54771High
A vulnerability in Langroid framework prior to version 0.65.3 allows untrusted users to directly invoke tools via raw JSON payloads, even when tools are registered with `use=False, handle=True`.
- CVE-2026-50181High
In the Langroid framework, the ReadFileTool and WriteFileTool do not validate that the file path stays within the working directory (curr_dir). This allows an attacker to read and write files outside the allowed directory using path traversal sequences like ../.
- CVE-2026-50180High
In Langroid library prior to version 0.64.0, the SQLChatAgent component has an imperfect _validate_query defense layer that fails to block all dangerous SQL primitives. The blocklist misses PostgreSQL file-reading functions (pg_read_file, pg_stat_file) and SQL Server/SQLite constructs, allowing an attacker to read files from the database host.
Original NVD description (English source)
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.

