Executive brief
Langroid, a framework for building Multi-Agent LLM applications, contains a vulnerability in its TableChatAgent component. This component is used to interact with tabular data using natural language. An attacker can exploit this to execute unauthorized code on the server hosting the application, potentially leading to full system takeover, data theft, or service disruption.
Technical details
The TableChatAgent in Langroid uses the pandas eval() function to process data queries. Because this function is used on potentially untrusted input from a Large Language Model (LLM) or user prompt, it is susceptible to code injection (CWE-94). An attacker can craft a prompt that forces the agent to execute arbitrary Python code, such as system commands via 'os.system', to read files or gain shell access. The vulnerability is reachable over the network without authentication if the LLM application is public-facing. Version 0.53.15 introduces input sanitization to mitigate common attack vectors.
Affected products
- langroid langroid < 0.53.15
Timeline
- 2025-05-20: disclosed
- 2025-05-20: advisory
- 2025-05-20: patched: Fixed in version 0.53.15