CVE-2025-46725
JSON

8.1high

Langroid has a Code Injection vulnerability in LanceDocChatAgent through vector_store

Severity
8.1high CVSS:4.0 by GitHub_M
Exploit likelihood
0.54% (higher than 47% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-22c2-9gwg-mj59PYSEC-2026-1531

Description

Langroid is a Python framework to build large language model (LLM)-powered applications. Prior to version 0.53.15, `LanceDocChatAgent` uses pandas eval() through `compute_from_docs()`. As a result, an attacker may be able to make the agent run malicious commands through `QueryPlan.dataframe_calc]`) compromising the host system. Langroid 0.53.15 sanitizes input to the affected function by default to tackle the most common attack vectors, and added several warnings about the risky behavior in the project documentation.

Affected

Product or packageVersionsReported by
langroid langroid< 0.53.15, before 0.53.15CVE List, NVD
langroid (PyPI)before 0.53.15GitHub Advisory Database, PyPA Advisory Database

All scores

GitHub_M8.1high CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:U
GitHubhigh CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:U
NVD9.8critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
PyPA Advisory DatabaseNot scored CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:U

Classification

CWE-94

SSVC (CISA-ADP): exploitation none, automatable yes, technical impact total.

What each source says

CVE List

Langroid is a Python framework to build large language model (LLM)-powered applications. Prior to version 0.53.15, `LanceDocChatAgent` uses pandas eval() through `compute_from_docs()`. As a result, an attacker may be able to make the agent run malicious commands through `QueryPlan.dataframe_calc]`) compromising the host system. Langroid 0.53.15 sanitizes input to the affected function by default to tackle the most common attack vectors, and added several warnings about the risky behavior in the project documentation.

GitHub Advisory Database
Summary

LanceDocChatAgent uses pandas eval() through compute_from_docs(): https://github.com/langroid/langroid/blob/18667ec7e971efc242505196f6518eb19a0abc1c/langroid/vector_store/base.py#L136-L150

As a result, an attacker may be able to make the agent run malicious commands through QueryPlan.dataframe_calc compromising the host system.

Fix

Langroid 0.53.15 sanitizes input to the affected function by default to tackle the most common attack vectors, and added several warnings about the risky behavior in the project documentation.

NVD (es)

Langroid es un framework de Python para crear aplicaciones basadas en modelos de lenguaje grandes (LLM). Antes de la versión 0.53.15, `LanceDocChatAgent` utilizaba la función eval() de Pandas mediante `compute_from_docs()`. Como resultado, un atacante podría hacer que el agente ejecute comandos maliciosos a través de `QueryPlan.dataframe_calc]`, comprometiendo así el sistema host. Langroid 0.53.15 depura la entrada a la función afectada de forma predeterminada para abordar los vectores de ataque más comunes y añadió varias advertencias sobre este comportamiento riesgoso en la documentación del proyecto.

References

Sources

SourceRecordLicence
CVE ListCVE-2025-46725 changed 2025-05-20CVE Terms of Use
GitHub Advisory DatabaseGHSA-22c2-9gwg-mj59 changed 2026-07-07CC-BY-4.0
NVDCVE-2025-46725 changed 2026-06-17Public domain
PyPA Advisory DatabasePYSEC-2026-1531 changed 2026-07-07CC-BY-4.0