PyPI: langroid

CVE-2026-54769

Safety vulnerability ID: SFTY-20260706-06638

Affected versions of the Langroid package are vulnerable to Remote Code Execution due to incomplete `eval()` mitigation in the `TableChatAgent` and `VectorStore` modules. The `TableChatAgent.pandas_eval()` and `VectorStore` methods attempt to sandbox execution by setting `locals` to an empty dictionary `{}` but fail to scrub `__builtins__` from the `globals` dictionary, allowing access to dangerous functions like `__import__('os').system()`. An attacker can exploit this by crafting a prompt that causes the language model to execute arbitrary system commands, leading to unauthenticated Remote Code Execution on the host system.

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

Overview

Langroid: Sandbox Escape to Remote Code Execution via Incomplete `eval()` Mitigation in TableChatAgent

Advisory

langroid – Code Injection

Affected Package

Affecting langroid package, versions<= 0.65.1

Also affects

---

How to Fix

Upgradelangroidto0.65.2or 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