{"id":"CVE-2026-54760","published":"2026-07-09T23:49:52Z","modified":"2026-07-10T15:27:12Z","title":"Langroid: SQLChatAgent dangerous-function blocklist can be bypassed with quoted or schema-qualified pg_read_file calls","vendor":"langroid","product":"langroid","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":9.3,"severity":"CRITICAL","version":"4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00646,"percentile":0.45571,"provenance":"source"},"cwes":[{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"},{"id":"CWE-89","name":"Improper Neutralization of Special Elements used in an SQL Command"}],"references":[{"url":"https://github.com/langroid/langroid/security/advisories/GHSA-6xc5-4r68-67fc","tags":["x_refsource_CONFIRM"]}],"priority":{"score":15.6,"factors":[{"name":"EPSS percentile","points":9.11},{"name":"CVSS severity","points":6.51}]},"vendorSlug":"langroid","affectedVersions":[{"vendor":"langroid","product":"langroid","versions":["< 0.65.1"]}],"ssvc":{"exploitation":"poc","automatable":"yes","technicalImpact":"total","timestamp":"2026-07-10T15:27:08.297594Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"langroid","vulnerableRanges":["<0.65.1"],"patched":["0.65.1"],"from":["GHSA-6xc5-4r68-67fc","PYSEC-2026-2577"],"provenance":"source"}],"euvd":{"id":"EUVD-2026-42754","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2026-25879","published":"2026-06-01","fixed":"0.63.0","kev":false},{"cve":"CVE-2026-50180","published":"2026-07-09","fixed":"0.64.0","kev":false},{"cve":"CVE-2026-50181","published":"2026-07-09","fixed":"0.64.0","kev":false},{"cve":"CVE-2026-54760","published":"2026-07-09","fixed":"0.65.1","kev":false},{"cve":"CVE-2026-54769","published":"2026-07-09","fixed":"0.65.2","kev":false,"link":{"from":"CVE-2026-54760","to":"CVE-2026-54769","relation":"successor","confidence":"low","kind":"sequence","orderedBy":"description","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:langroid","fromFixed":"0.65.1","toFixed":"0.65.2","daysApart":0}]}},{"cve":"CVE-2026-54771","published":"2026-07-09","fixed":"0.65.3","kev":false},{"cve":"CVE-2026-55615","published":"2026-07-09","fixed":"0.65.5","kev":false}],"package":"PyPI:langroid"}}