Improper Control of Generation of Code ('Code Injection')
CVE-2026-25481
Summary
Langroid is a framework for building large-language-model-powered applications. Prior to version 0.59.32, there was a bypass to the fix for CVE-2025-46724. TableChatAgent can call the "pandas_eval" tool to evaluate the expression. There is a WAF in "langroid/utils/pandas_utils.py" introduced to block code injection CVE-2025-46724. However, it can be bypassed due to "_literal_ok()" returning False instead of raising UnsafeCommandError on invalid input, combined with unrestricted access to dangerous dunder attributes (__init__, __globals__, __builtins__). This allows chaining whitelisted DataFrame methods to leak the eval builtin and execute arbitrary code. This issue has been patched in version 0.59.32.
- LOW
- NETWORK
- HIGH
- CHANGED
- REQUIRED
- NONE
- HIGH
- HIGH
CWE-94 - Code Injection
Code injection is a type of vulnerability that allows an attacker to execute arbitrary code. This vulnerability fully compromises the machine and can cause a wide variety of security issues, such as unauthorized access to sensitive information, manipulation of data, denial of service attacks etc. Code injection is different from command injection in the fact that it is limited by the functionality of the injected language (e.g. PHP), as opposed to command injection, which leverages existing code to execute commands, usually within the context of a shell.
References
Advisory Timeline
- Published