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.
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.
How to Fix
Mitigation and Workarounds
---
Vulnerable Functions
Functions linked to known vulnerabilities.
References
- https://getsafety.com/vulnerabilities/SFTY-20260202-96678/CVE-2026-25481
- https://github.com/langroid/langroid/security/advisories/GHSA-jqq5-wc57-f8hj
- https://github.com/langroid/langroid/security/advisories/GHSA-x34r-63hx-w57f
- https://github.com/langroid/langroid/commit/30abbc1a854dee22fbd2f8b2f575dfdabdb603ea
- https://nvd.nist.gov/vuln/detail/CVE-2026-25481
- https://github.com/pypa/advisory-database/tree/main/vulns/langroid/PYSEC-2026-383.yaml
- https://pypi.org/project/langroid
- https://github.com/advisories/GHSA-x34r-63hx-w57f
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
