# CVE-2025-46725: PYSEC-2026-1531 - Langroid has a Code Injection vulnerability in LanceDocChatAgent through vector_store

Source: https://junglewise.ai/threats/cve-2025-46725-langroid-code-injection-in-lancedocchatagent-vector-store  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-07-07. Updated: 2026-09-26  
License: CC BY 4.0 with a link back

CVE-2025-46725 · Severity: medium · CVSS 4 · Published 2026-07-07

Langroid is a Python library for building AI agents with vector database support. The LanceDocChatAgent component uses pandas' eval() function to perform calculations on document data, allowing attackers to inject arbitrary Python code through maliciously crafted query parameters. A successful attack could give an attacker complete control over the host system running the affected application.

Technologies: [langroid (PyPI)](https://junglewise.ai/threats/technologies/langroid). Vendors: [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2025-46725 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2025-46725 being exploited in the wild.

**How severe is CVE-2025-46725?** Medium severity, with a CVSS score of 4, published 7 July 2026.

**Which products and versions are affected?** langroid (PyPI) ECOSYSTEM:introduced=0,fixed=0.53.15.

**Is there a fix for CVE-2025-46725?** Yes. langroid (PyPI): upgrade to 0.53.15 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2025-46725 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2025-46725?** Check whether you run langroid (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- langroid (PyPI): upgrade to 0.53.15 or later

  ```sh
  pip install "langroid>=0.53.15"
  ```


## Technical details

The vulnerability is a code injection flaw in the compute_from_docs() method of the vector_store module, which uses pandas.eval() with user-supplied input to execute dataframe calculations. The vulnerable code path is reachable through QueryPlan.dataframe_calc parameters, which are not properly sanitized before being passed to pd.eval(). An unauthenticated attacker with network access to an application using LanceDocChatAgent can exploit this by crafting malicious calculation expressions that execute arbitrary Python code on the host system. The fix in version 0.53.15 adds input sanitization and documentation warnings about the risky behavior.

## Affected products

- Langroid Langroid before 0.53.15

## Identifiers

- CVE-2025-46725
- GHSA-22c2-9gwg-mj59
- PYSEC-2026-1531

## Timeline

- 2025-05-20: disclosed
- 2025-05-20: patched: Version 0.53.15 released with input sanitization

## References

- [https://github.com/langroid/langroid/security/advisories/GHSA-22c2-9gwg-mj59](https://github.com/langroid/langroid/security/advisories/GHSA-22c2-9gwg-mj59)

## Related threats

- [Langroid prompt injection in Neo4jChatAgent and ArangoChatAgent](https://junglewise.ai/threats/cve-2026-55615-langroid-prompt-injection-in-neo4jchatagent-and-arangochatagent)
- [Langroid unauthorized tool invocation via raw JSON payloads](https://junglewise.ai/threats/cve-2026-54771-langroid-unauthorized-tool-invocation-via-raw-json-payloads)
- [Langroid sandbox escape and RCE in TableChatAgent and VectorStore](https://junglewise.ai/threats/cve-2026-54769-langroid-sandbox-escape-and-rce-in-tablechatagent-and-vectorstore)
- [Langroid SQLChatAgent regex bypass in SQL injection mitigation](https://junglewise.ai/threats/cve-2026-54760-langroid-sqlchatagent-regex-bypass-in-sql-injection-mitigation)
- [Langroid path traversal in ReadFileTool and WriteFileTool](https://junglewise.ai/threats/cve-2026-50181-langroid-path-traversal-in-readfiletool-and-writefiletool)
