PyPI: langroid

CVE-2026-50180

Safety vulnerability ID: SFTY-20260702-87615

Affected versions of the `langroid` package are vulnerable to Arbitrary File Read due to an incomplete blocklist in the `_validate_query` method. The `_DANGEROUS_SQL_PATTERNS` regex blocklist fails to include the PostgreSQL filesystem-disclosure functions such as `pg_read_file()`, `pg_stat_file()`, and others, allowing them to bypass security checks. An attacker can exploit this vulnerability by crafting SQL queries that include these functions, enabling them to read arbitrary files from the PostgreSQL host, potentially exposing sensitive information.

Created at: Jul 10, 2026Updated at: Jul 10, 2026

Overview

Langroid: SQLChatAgent _validate_query blocklist misses pg_read_file family enabling arbitrary file read

Advisory

langroid – Path Traversal

Affected Package

Affecting langroid package, versions<= 0.63.0

Also affects

---

How to Fix

Upgradelangroidto0.64.0or higher.

Mitigation and Workarounds

---

Vulnerable Functions

Functions linked to known vulnerabilities.

Vulnerable function data is available for Enterprise customers

Book a call with us to see Safety in action.

Safety

Verified by Safety

Our Cybersecurity Intelligence Team reviewed this vulnerability. We combine public data with our own research to find issues not yet reported to public sources.

Learn more