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.
Overview
Langroid: Sandbox Escape to Remote Code Execution via Incomplete `eval()` Mitigation in TableChatAgent
Advisory
langroid – Code Injection
How to Fix
Mitigation and Workarounds
---
Vulnerable Functions
Functions linked to known vulnerabilities.
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
