PT-2026-56062 · Langroid · Langroid
CVE-2026-54760
·
Published
2026-07-06
·
Updated
2026-07-13
CVSS v4.0
9.3
Critical
| Vector | AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N |
Name of the Vulnerable Software and Affected Versions
Langroid versions prior to 0.65.1
Description
Langroid is a framework for building large-language-model-powered applications. The
SQLChatAgent component implements a SQL-injection mitigation that uses a raw-text regex blocklist ( DANGEROUS SQL PATTERNS) and a sqlglot SELECT-only statement allowlist when allow dangerous operations is set to False. The regex used to block dangerous callable functions requires the function name to be immediately followed by optional whitespace and an opening parenthesis. However, PostgreSQL allows function calls where the name is separated from the parenthesis by quoted identifiers, inline comments, or schema qualification. These variations evade the regex check while still being parsed as SELECT statements, allowing the execution of restricted PostgreSQL functions such as pg read file(). This can lead to a server-side file-read primitive if the database role has sufficient privileges, such as superuser or pg read server files.Recommendations
Update to version 0.65.1.
Run
SQLChatAgent using a least-privilege database role that does not possess the pg read server files privilege.Exploit
Fix
SQL injection
Path traversal
Found an issue in the description? Have something to add? Feel free to write us 👾
Related Identifiers
Affected Products
Langroid