CVE-2026-25481
Unknown Unknown - Not Provided
Code Injection Bypass in Langroid TableChatAgent Enables RCE

Publication date: 2026-02-04

Last updated on: 2026-02-20

Assigner: GitHub, Inc.

Description
Langroid is a framework for building large-language-model-powered applications. Prior to version 0.59.32, there is a bypass to the fix for CVE-2025-46724. TableChatAgent can call 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.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-02-04
Last Modified
2026-02-20
Generated
2026-05-07
AI Q&A
2026-02-04
EPSS Evaluated
2026-05-05
NVD
EUVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
langroid langroid to 0.59.32 (exc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-94 The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

CVE-2026-25481 is a critical remote code execution vulnerability in the langroid framework, specifically affecting versions up to 0.59.31 in the TableChatAgent component.

The vulnerability arises because the Web Application Firewall (WAF) designed to block code injection in the pandas_eval tool can be bypassed. This is due to the _literal_ok() function returning false instead of raising an error on invalid input, combined with unrestricted access to dangerous Python special (dunder) attributes like __init__, __globals__, and __builtins__.

Attackers can chain whitelisted pandas DataFrame methods to leak the eval builtin function and execute arbitrary code remotely. For example, by injecting a malicious payload as a DataFrame column name, they can execute shell commands on the server hosting the vulnerable langroid instance.

This issue was patched in version 0.59.32.


How can this vulnerability impact me? :

This vulnerability allows remote attackers to execute arbitrary shell commands on the server running the vulnerable langroid instance without any privileges or user interaction.

Such arbitrary code execution can lead to full system compromise, including unauthorized access to sensitive data, modification or deletion of data, disruption of services, and potential lateral movement within the network.

Because the attack vector is network-based and requires low complexity, it poses a severe security risk to any system using affected versions of langroid.


How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:

I don't know


How can this vulnerability be detected on my network or system? Can you suggest some commands?

[{'type': 'paragraph', 'content': 'This vulnerability can be detected by monitoring for suspicious use of the pandas_eval tool within the TableChatAgent component of langroid, especially payloads that attempt to access Python dunder attributes such as __init__, __globals__, and __builtins__ to execute arbitrary code.'}, {'type': 'paragraph', 'content': "A practical detection method involves inspecting logs or runtime behavior for DataFrame operations that chain methods like add_prefix, transpose (T), and groupby with eval accessed through the DataFrame's __init__.__globals__['__builtins__']['eval'] path."}, {'type': 'paragraph', 'content': 'For example, you can search for suspicious payload patterns in logs or input data using commands like:'}, {'type': 'list_item', 'content': 'grep -r "__init__.__globals__" /path/to/langroid/logs'}, {'type': 'list_item', 'content': 'grep -r "__builtins__" /path/to/langroid/logs'}, {'type': 'list_item', 'content': 'grep -r "pandas_eval" /path/to/langroid/logs'}, {'type': 'paragraph', 'content': 'Additionally, monitoring for unexpected shell command executions or unusual system calls originating from the langroid process may help detect exploitation attempts.'}] [1]


What immediate steps should I take to mitigate this vulnerability?

The immediate and most effective mitigation is to upgrade langroid to version 0.59.32 or later, where the vulnerability has been patched.

The patch strengthens the sanitization logic by blocking access to dangerous dunder attributes and private attributes during AST traversal, raising an UnsafeCommandError on invalid input to prevent code injection.

If upgrading immediately is not possible, consider implementing additional input validation or restricting access to the pandas_eval tool and the TableChatAgent component to trusted users only.

Monitoring and alerting on suspicious DataFrame method chains or eval usage as described in detection can also help mitigate risk until the patch is applied.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart