HighVulnerability
CVE-2024-10940: langchain-core arbitrary file read through ImagePromptTemplate input variables
- Source
- NVD(opens in a new tab)
- Identifier
- CVE-2024-10940
- Published
- Record updated
- Affected
- langchain-core >= 0.1.17, < 0.1.53, fixed in 0.1.53, released November 1, 2024, 138 days before disclosure
- langchain-core >= 0.2.0, < 0.2.43, fixed in 0.2.43, released October 31, 2024, 140 days before disclosure
- langchain-core >= 0.3.0, < 0.3.15, fixed in 0.3.15, released October 31, 2024, 140 days before disclosure
- Known exploitation
- Not listed in the CISA Known Exploited Vulnerabilities catalog at the last check.
- EPSS
- 0.4%
Summary
A vulnerability in langchain-core versions >=0.1.17,<0.1.53, >=0.2.0,<0.2.43, and >=0.3.0,<0.3.15 lets unauthorized users read arbitrary files from the host file system. The flaw lies in langchain_core.prompts.ImagePromptTemplate, and by extension ChatPromptTemplate, which can be created with input variables that read any user-specified server path. If the prompt template outputs are exposed to the user, directly or through downstream model outputs, sensitive information can leak.
Mitigation
The source does not state a fix yet. Check the original advisory for updates.
Affected packages in the Exposure Registry
Matched by package name and ecosystem. Each entry shows whether the package delegates to a language model and how many tracked packages depend on it.
- langchain-corePyPILLM dependency since 2023-11-20 · 60 tracked dependents
Related items
- MediumGHSA-8prr-f582-jqq3: LangGraph CLI prints the registry push token in `langgraph deploy --verbose` outputSame vendor · GitHub Advisory Database
- HighGHSA-4hm6-w6qq-w73v: LangGraph JavaScript custom authentication may permit cross-user Store accessSame vendor · GitHub Advisory Database
- MediumGHSA-3fx2-cqw9-xr3c: LangGraph: Unencoded identifiers in LangGraph SDK v3 streaming can redirect authenticated GET requestsSame vendor · GitHub Advisory Database
- MediumGHSA-6hmw-9432-67qq: LangGraph: Namespace labels containing `.` reach other namespaces in Postgres and SQLite storesSame vendor · GitHub Advisory Database
- MediumCVE-2026-108575: BerriAI LiteLLM improper authorization in secret resolution via api_keySame vendor · NVD/CVE Database