CVE-2025-46724·Python vulnerability
Langroid is a Python framework to build large language model (LLM)-powered applications. Prior to version 0.53.15, `TableChatAgent` uses `pandas eval()`. If fed by untrusted user input, like the case of a public-facing LLM application, it may be vulnerable to code injection. Langroid 0.53.15 sanitizes input to `TableChatAgent` by default to tackle the most common attack vectors, and added several warnings about the risky behavior in the project documentation.
- Severity
- critical
- Software
- Python
- Fixed in
- 0.53.15
- Published
- 2025-05-20
Affected versions
Until: 0.53.15
Fixed in: 0.53.15
How to fix this CVE
Upgrade Langroid to version 0.53.15 or later to patch the code injection vulnerability in TableChatAgent. This version introduces input sanitization to block malicious pandas expressions by default. If you are running a public-facing LLM application that uses Langroid's table querying features, prioritize this update immediately to prevent arbitrary code execution through user-supplied data.
sudo dnf update python3-langroidDefensia detects this vulnerability
WAF mitigation (if patching is not yet possible)
Add this rule to your WAF to block exploitation attempts while you schedule the patch.
Implement WAF rules to block HTTP requests containing pandas DataFrame query syntax patterns such as lambda expressions, mathematical operators in unusual contexts, or function calls within table filter parameters. Monitor POST/GET parameters passed to LLM-backed endpoints for eval-like payloads including 'lambda', '__import__', 'exec', and 'eval' keywords.How to check if you are affected
- Step 1: Check Langroid version by running: python3 -c "import langroid; print(langroid.__version__)"
- Step 2: Identify if TableChatAgent is in use by grepping your application code: grep -r "TableChatAgent" /path/to/your/app
- Step 3: Search application logs for pandas eval() errors or unusual expression patterns: grep -E "(eval|pandas|expression).*error" /var/log/application.log
- Step 4: Verify the patch by confirming version is >= 0.53.15 and checking for input sanitization in Langroid's source: python3 -c "from langroid.agents.table_chat_agent import TableChatAgent; print(TableChatAgent.__module__)"
FAQ
What is CVE-2025-46724?
CVE-2025-46724 is a critical code injection vulnerability in Langroid's TableChatAgent that occurs when user-controlled input is passed to pandas' eval() function without sanitization, allowing remote code execution in public-facing LLM applications.
Is CVE-2025-46724 being actively exploited?
No, CVE-2025-46724 is not currently listed as actively exploited according to CISA KEV data, and no public exploits are available at this time.
What versions of Langroid are affected by CVE-2025-46724?
All versions of Langroid prior to 0.53.15 are vulnerable. The fix introduces default input sanitization starting from version 0.53.15.
How do I check if my server is vulnerable to CVE-2025-46724?
Run: python3 -c "import langroid; print(langroid.__version__)" and verify the version is 0.53.15 or later. If the version is lower, your installation is vulnerable.
Does Defensia detect CVE-2025-46724?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If Langroid is installed on a monitored server, CVE-2025-46724 will appear in your dashboard with remediation steps.
Related Python CVEs
References
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2025-46724. Free for 1 server.
Get started free