CVE-2026-54769: Langroid: Sandbox Escape to Remote Code Execution via Incomplete `eval()` Mitigation in TableChatAgent
Langroid is a framework for building large-language-model-powered applications. Versions prior to 0.65.2 are 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. Version 0.65.2 patches the issue.
Security readout for executives and security teams
Plain-English summary
A vulnerable Langroid app can let a prompt influence code evaluation in TableChatAgent or VectorStore, breaking the intended sandbox and allowing code execution on the server. The issue affects Langroid versions before 0.65.2 and is rated CVSS 10.0. The vendor advisory says 0.65.2 patches it.
Executive priority
Treat this as urgent for any Langroid-powered application exposed to users or external prompts. The issue is critical because successful exploitation can become server-side code execution without authentication. Prioritize upgrade and exposure discovery before broader hardening work.
Technical view
When full_eval=True, Langroid evaluated LLM-generated tool messages with Python eval() and an empty locals map, but did not remove __builtins__ from globals. Python can implicitly expose built-ins, defeating the intended sandbox. In affected TableChatAgent and VectorStore paths, this creates sandbox escape and remote code execution risk from prompt-controlled input.
Likely exposure
Exposure is most likely in applications using Langroid before 0.65.2 with TableChatAgent or VectorStore features that evaluate LLM-generated tool messages using full_eval=True. Internet-facing or unauthenticated prompt entry points have the highest risk. The sources do not identify specific downstream products or deployments.
Exploitation context
The advisory describes unauthenticated RCE when an attacker can provide prompt payloads that reach vulnerable evaluation paths. CVE data marks KEV as false, and the provided sources do not confirm active exploitation in the wild.
Researcher notes
The root issue is an incomplete eval sandbox: empty locals did not prevent built-ins from being available through globals. The sources attribute impact to TableChatAgent and VectorStore capabilities before 0.65.2. Evidence is strong for affected version and fix version, but public exploitation status is not established.
Mitigation direction
Upgrade Langroid to version 0.65.2 or later.
Disable full_eval=True where untrusted prompt input can influence tool messages.
Avoid native evaluation of LLM-generated content unless strictly required.
Review vendor guidance for any additional hardening or backport details.
Restrict public access to affected prompt interfaces until upgraded.
Validation and detection
Inventory dependency manifests and lockfiles for Langroid versions before 0.65.2.
Identify code paths using TableChatAgent, VectorStore, pandas_eval, or full_eval=True.
Confirm deployed environments run the patched Langroid version.
Review logs for unusual prompt activity around affected agent workflows.
Verify untrusted LLM/tool output is not evaluated natively.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · medium confidence lookup
CWE-94: Code execution behavior lookup
Code execution and unsafe deserialization weaknesses often justify reviewing execution behavior and process telemetry. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
The CVE wording references code or command execution, so execution technique review may help defensive triage. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.
The CVE wording references privilege impact, so privilege escalation and authorization behavior review may help. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
1CVSS vectors
3Timeline events
1ADP providers
2Source links
SSVC decision data
CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: pocAutomatable: yesTechnical Impact: total
CVSS vector scores
1 official score
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-94 · source CWE mapping
Improper Control of Generation of Code ('Code Injection')
Improper Control of Generation of Code ('Code Injection') represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.