PyPI: langroid

CVE-2026-25481

Safety vulnerability ID: SFTY-20260202-96678

Safety legacy ID: pyup.io-85689

Affected versions of the langroid package are vulnerable to Remote Code Execution due to an incomplete WAF used to restrict pandas expression evaluation. The TableChatAgent pandas_eval tool in langroid/agent/special/table_chat_agent.py relies on the WAF logic in langroid/utils/pandas_utils.py, but _literal_ok() returns False instead of raising UnsafeCommandError and still permits access to dangerous dunder attributes such as __init__, __globals__, and __builtins__, enabling attackers to recover the eval builtin through chained whitelisted DataFrame methods.

Created at: Mar 4, 2026Updated at: Mar 4, 2026

Overview

Langroid has WAF Bypass Leading to RCE in TableChatAgent

Advisory

Affected versions of the langroid package are vulnerable to Remote Code Execution due to an incomplete WAF used to restrict pandas expression evaluation. The TableChatAgent pandas_eval tool in langroid/agent/special/table_chat_agent.py relies on the WAF logic in langroid/utils/pandas_utils.py, but _literal_ok() returns False instead of raising UnsafeCommandError and still permits access to dangerous dunder attributes such as __init__, __globals__, and __builtins__, enabling attackers to recover the eval builtin through chained whitelisted DataFrame methods.

Affected Package

Affecting langroid package, versions<0.59.32

Also affects

---

How to Fix

Upgradelangroidto0.59.32or higher.

Mitigation and Workarounds

---

Vulnerable Functions

Functions linked to known vulnerabilities.

Vulnerable function data is available for Enterprise customers

Book a call with us to see Safety in action.

Safety

Verified by Safety

Our Cybersecurity Intelligence Team reviewed this vulnerability. We combine public data with our own research to find issues not yet reported to public sources.

Learn more