# CVE-2026-54769: Langroid: Sandbox Escape to Remote Code Execution via Incomplete `eval()` Mitigation in TableChatAgent

- Severity: Critical 10.0 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.64%, higher than 51% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-07-06T20:42:00.000Z
- Modified: 2026-07-13T16:43:21.984Z
- Also known as: GHSA-q9p7-wqxg-mrhc, PYSEC-2026-2581
- Weaknesses: CWE-94
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact total
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- langroid langroid: < 0.65.2
- langroid (PyPI): before 0.65.2

## Every score

- GitHub_M: CVSS:3.1 10.0 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H`
- GitHub: CVSS:3.1 10.0 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H`
- PyPA Advisory Database: CVSS:3.1 10.0 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H`

## References

- <https://github.com/langroid/langroid/security/advisories/GHSA-q9p7-wqxg-mrhc> (exploit, web)
- <https://github.com/langroid/langroid> (package)
- <https://pypi.org/project/langroid> (package)
- <https://github.com/advisories/GHSA-q9p7-wqxg-mrhc> (advisory)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-54769> (advisory)

## Sources

- CVE List: [CVE-2026-54769](https://www.cve.org/CVERecord?id=CVE-2026-54769), CVE Terms of Use, modified 2026-07-10
- GitHub Advisory Database: [GHSA-q9p7-wqxg-mrhc](https://github.com/advisories/GHSA-q9p7-wqxg-mrhc), CC-BY-4.0, modified 2026-07-13
- NVD: [CVE-2026-54769](https://nvd.nist.gov/vuln/detail/CVE-2026-54769), Public domain, modified 2026-07-10
- PyPA Advisory Database: [PYSEC-2026-2581](https://osv.dev/vulnerability/PYSEC-2026-2581), CC-BY-4.0, modified 2026-07-13

---

Page: https://cve.day/CVE-2026-54769 · Whole record: https://cve.day/CVE-2026-54769.json · Rebuilt by cve.day 2026-11-25T22:59:27.584Z
