CVE-2026-50180
Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.
NVD · uneditedLangroid is a framework for building large-language-model-powered applications. Prior to version 0.64.0, `SQLChatAgent` in `langroid` ships a `_validate_query` defense-in-depth layer whose `_DANGEROUS_SQL_PATTERNS` regex blocklist enumerates dangerous SQL primitives by specific function name. The list misses the canonical PostgreSQL filesystem-disclosure family `pg_read_file()`, `pg_stat_file()`, `pg_ls_logdir()`, `pg_ls_waldir()`, `pg_current_logfile()` (and similar `SELECT`-shaped functions in the same family). It also leaves SQL Server `OPENDATASOURCE` and SQLite `ATTACH '<file>' AS x` (DATABASE keyword omitted) unblocked. An attacker able to shape the LLM's generated SQL (directly via prompt input or transitively via prompt-injection in data the LLM ingests) can read arbitrary files from the PostgreSQL host through ordinary `SELECT` queries, even with the agent's strict default configuration (`allow_dangerous_operations=False`, `allowed_statement_types=['SELECT']`). The payloads survive the statement-type allowlist (each is a `SELECT`) and pass through the regex blocklist (none of the function names match), then reach the live SQLAlchemy engine via `SQLChatAgent.run_query`. Version 0.64.0 contains a patch for the issue.
Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.
dbcve analysis · high confidenceLangroid's SQLChatAgent has an incomplete regex blocklist (_DANGEROUS_SQL_PATTERNS) that fails to block dangerous PostgreSQL filesystem functions (pg_read_file, pg_stat_file, pg_ls_logdir, pg_ls_waldir, pg_current_logfile), SQL Server OPENDATASOURCE, and SQLite ATTACH. These SELECT-based payloads bypass both the allow_dangerous_operations setting and the statement-type allowlist, enabling arbitrary file reads from the database host.
Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.
CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.
From the vector- Attack vector
- Network
- Complexity
- Low
- Privileges
- None
- Authentication
- X
- User interaction
- None
- Scope
- X
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.
dbcve checksWork through these to decide whether this CVE applies to you.
-
Check installed Langroid versionRun `pip show langroid` or `pip list | grep langroid` to display the installed package versionAffected if Version is below 0.64.0 (the patch that added missing patterns to the blocklist)
-
Verify SQLChatAgent is in useInspect your codebase for imports and instantiation of `SQLChatAgent` from langroid, or check runtime configuration for agent typeAffected if SQLChatAgent class is being used for database interactions
-
Inspect the _DANGEROUS_SQL_PATTERNS blocklistLocate the langroid source file containing `_DANGEROUS_SQL_PATTERNS` (typically in agent/sql/sql_chat_agent.py or similar) and examine the regex patterns defined thereAffected if The blocklist does NOT contain: pg_read_file, pg_stat_file, pg_ls_logdir, pg_ls_waldir, pg_current_logfile (PostgreSQL), OPENDATASOURCE (SQL Server), or ATTACH (SQLite)
-
Check allow_dangerous_operations settingSearch your configuration or code for `allow_dangerous_operations` setting passed to SQLChatAgentAffected if Setting is enabled (True) or not explicitly blocking SELECT-based file-read operations
-
Confirm database type in useReview your database connection configuration to identify if PostgreSQL, SQL Server, or SQLite is being used with SQLChatAgentAffected if Connected database is PostgreSQL, SQL Server, or SQLite - these are the affected database backends
You are affected if you use SQLChatAgent with Langroid version below 0.64.0 and connect to PostgreSQL, SQL Server, or SQLite databases, particularly with allow_dangerous_operations enabled.
Generated from the published advisory. Verify against your own configuration.
Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.
dbcve · scopedUpgrade to langroid version 0.64.0 or later, which contains the patch adding the missing patterns to the blocklist.
0.64.0
- Upgrade langroid to version 0.64.0 or later using your package manager (e.g., pip install langroid>=0.64.0 or pip install --upgrade langroid)
- Verify the upgrade was successful by checking the installed version (e.g., pip show langroid | grep Version)
Generated from the published advisory — verify against the referenced sources before acting.
- Consultation1.0 h
- Implementation1.0 h
- Testing2.0 h
- Review / QA1.0 h
An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $1,376.
Scan for this in your stack
Free · runs locallyCheck whether your project pulls in CVE-2026-50180 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.
References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.
Primary sourcesPractitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2026-50180 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
No notes yet
Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.
A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.
- Verified mitigations, workarounds, and config changes
- Version or environment caveats, and links to real fixes
- No weaponised exploit code, or anything meant to cause harm
- No spam, self-promotion, credentials, or personal data