Description
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.
Published: 2026-07-09
Score: 10 Critical
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

A sandbox escape flaw in the Agent or VectorStore components to execute arbitrary code, because the framework forgets to remove built‑in functions from the globals dictionary before calling Python’s eval() on LLM‑generated tool messages. This issue is a classic code injection vulnerability, CWE‑94, that can be satisfied with a short payload built into a user prompt. Attackers can supply that payload that runs Langroid, thereby obtaining perfect remote code execution privileges.

Affected Systems

The Langroid Python library, any application that imports langroid:langroid and uses TableChatAgent or VectorStore with full_eval=True, is affected. All users of versions earlier than 0.65.2 must review their deployments. The flaw does not appear in releases 0.65.2 and later, where the fixed code properly sanitizes built‑ins.

Risk and Exploitability

The CVSS score of 10 indicates maximum severity, and the EPSS score of < 1% indicates a very low but non‑zero likelihood of exploitation vulnerability is not listed in the CISA KEV catalog. A patch is available in Langroid version 0.65.2; until updated, an attacker can exploit the flaw by crafting Vector LLM‑generated tool messages with eval(). The attack requires the TableChatAgent or VectorStore to be invoked with full_eval=True, no additional privileges or components are necessary.

Generated by OpenCVE AI on July 29, 2026 at 11:36 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Langroid to 0.65.2 or later so that the eval removes built‑ins.
  • If upgrading is not immediately possible, set full_eval=Falseced tool messages with eval().
  • Restrict the runtime permissions of the process executing Langroid to the minimal set of OS capabilities required for its normal operation, and monitor for anomalous execution requests from the framework.

Generated by OpenCVE AI on July 29, 2026 at 11:36 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-q9p7-wqxg-mrhc Langroid: Sandbox Escape to Remote Code Execution via Incomplete `eval()` Mitigation in TableChatAgent
History

Fri, 10 Jul 2026 15:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Fri, 10 Jul 2026 02:15:00 +0000

Type Values Removed Values Added
First Time appeared Langroid
Langroid langroid
Vendors & Products Langroid
Langroid langroid

Fri, 10 Jul 2026 00:15:00 +0000

Type Values Removed Values Added
Description 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.
Title Langroid: Sandbox Escape to Remote Code Execution via Incomplete `eval()` Mitigation in TableChatAgent
Weaknesses CWE-94
References
Metrics cvssV3_1

{'score': 10, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H'}


Subscriptions

Langroid Langroid
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-07-10T14:12:23.422Z

Reserved: 2026-06-15T23:23:57.713Z

Link: CVE-2026-54769

cve-icon Vulnrichment

Updated: 2026-07-10T14:11:41.869Z

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-07-29T11:45:03Z

Weaknesses
  • CWE-94

    Improper Control of Generation of Code ('Code Injection')